Language Support and Internationalization (i18n)
AssetNow NX uses language bundles to make is easy to internationalize (i18n) user interface text and messages. The i18n bundle files are located in the /sys/i18n/
directory.
The following table lists some commonly used languages and their respective locale and locale code. AssetNow NX can support any language that can be represented using Unicode.
| Language | Locale | Locale Code |
|---|---|---|
| Chinese Traditional | Chinese (Taiwan) | zh_TW |
| Chinese Simplified | Chinese (China) | zh_CN |
| Chinese Traditional | Chinese (Hong Kong) | zh_HK |
| Dutch | Dutch (Standard) | nl_NL |
| English (American) | English (US) | en_US |
| French | French (Standard) | fr_FR |
| German | German (Standard) | de_DE |
| Japanese | Japanese | ja_JP |
Complete listing of the ISO 639 language codes can be found at Library of Congress. Also refer to W3C i18n Activity.
Unicode (UTF-8) encoding is recommended for all deployments in preference to language specific character set encodings such as ISO-8859 (typically used by European languages), BIG5 (Chinese), SHIFT-JIS (Japanese) etc.
In addition to language support, Unicode will also ensure your content can be used with future applications and technologies.
Language Bundles
AssetNow NX uses language bundles to allow localization of interface text. Bundle files are named according to the required language using the ISO language codes and have a .properties
extension.
AssetNow NX provides separate bundle files for the site interface text and the AssetNow NX tools interface text.
| Language | Bundle File | Description |
|---|---|---|
| English (US) | site_en_US.properties | Primary AssetNow site interface text strings |
| English (US) | tools_en_US.properties | AssetNow tools interface text strings |
There are also a number of other bundles files for specific templates/widgets, text blocks, and email messages.
Since the site and tools bundles are accessed frequently they are persisted in memory, if you change these files by directly editing them you must reset the bundles via Tools > System > Reset > I18N Bundles. If you edit the bundles using the bundles editor tool you do not need to reset the site for changes to take effect.
When a page is rendered AssetNow applies the locale set in the category containing the page. Tools interface text is displayed using the locale of the user.
The available locale/s for categories, and applied to content pages, are obtained from the SUPPORTED_LOCALES configuration parameter. This parameter is set via Tools > System > Tools > Setup and is set to a English (US) by default.
AssetNow NX is supplied with bundles files for English (US).
Bundle files contain text identifier (key) and value pairs formatted as follows:
AN_TEXT_STRING = Localized text to display
Each identifier and value must appear on a new line. Since values are constants by convention the key is uppercase. Keys are prefixed with AN_ to make it easy to search/find localization keys in code.
If a bundle file does not exist for a language you specify in the SUPPORTED_LOCALES parameter it will be created and the error logged when the bundle is requested. You can then edit the bundles files directly using a text editor or using the Tools > System > Tools > Bundles tool. You can also copy/rename the supplied bundle files for the required locale, and translate the text strings.
If a localized text string is requested that does not have a corresponding entry in a bundle file the string will be added to the bundle file and logged in the i18n log. The log file is available from Tools > System > Reports > Logs. You should review this log file and then edit the text using the bundles editor tool as described above.
If you require more specific text due to language semantic or contextual requirements you can modify the AssetNow NX templates by adding additional user interface text strings. Corresponding text strings are then added in the associated bundle file. You can create and call your own bundle files and optionally persist them in memory if appropriate.
Editor Localization
AssetNow NX XHTML editor provides two xml files containing user interface strings for localization. These are located in the /sys/config/xs/custom/
directory and named localization.xml
and buttons.xml. You also need to enable the editor_xs_use_custom_files
setting via Tools > Modules > tree. Edit the required instance of the tree (publishing) tool, by default there is only one instance, select the Settings tab check the editor_xs_use_custom_files
option.
Spellchecker Dictionaries
The editor spell checking is set to the language of the category containing the document being edited. For example if the document you are editing is contained in a category with language set to French then the editor spell checker will be set to French.
The XStandard XHTML editor uses a web services based spell checker. The spell checker provides numerous dictionaries including Danish, Dutch, English, Finnish, French, German, Italian, Norwegian, Portuguese, Spanish and Swedish. Check the XStandard web site for details.
Links Referenced
- Library of Congress
- http://www.loc.gov/standards/iso639-2/php/code_list.php
- W3C i18n Activity
- http://www.w3.org/International/
- XStandard web site
- http://www.xstandard.com
Location
http://www.assetnow.com/index.cfm/1,84,277,0,html
Copyright © Orbital Limited 2008