Multiple languages¶
Items
Overview¶
Meaning of Multilingual support¶
Multilingual support means the system does not support just one language, but multiple languages are supported.
Multilingual support of intra-mart Accel Platform¶
Following 4 are the configuration elements to support multiple languages in intra-mart Accel Platform .
- Definition of language
It defines the language used in intra-mart Accel Platform .
- Definition of message
The translation for the messages to be shown to the user is provided in all the languages defined in the intra-mart Accel Platform .Message is managed by “Language ID” and “Message code”.
- Language resolution
User can register the language to be used in intra-mart Accel Platform .Default language is applicable if no language is registered.For solution sequence of language, refer to Defined Access Context.
- Message Acquisition
intra-mart Accel Platform provides API (MessageManager) to acquire a message supported by multiple languages.MessageManager acquires the appropriate message from “Message code” and “User’s language”.Refer to Acquire multilingual messages for the usage of MessageManager.
Definition of Language¶
Definition of Default Language¶
Languages defined by intra-mart Accel Platform at the initial status are as follows.
Language Language ID English en Japanese ja Chinese(Simplified)
zh_CN
- Language Master File
Languages defined in intra-mart Accel Platform are mentioned in XML file “Language master file”.The system default format in initial state is “English format”.
- Configuration File
<CONTEXT_PATH>/WEB-INF/conf/locale-config/im-locale-default.xml
Message Definition¶
Following 3 are the configuration elements of message in intra-mart Accel Platform .
- Message code
It is the code linked with the message contents.It is not necessary to understand the message code provided by intra-mart Accel Platform , as the code system is based on internal rules.
- Language ID
Language ID is defined in the language master file for the language which is defined by intra-mart Accel Platform .
- Translated Message
Translation is provided only for the languages which are defined by intra-mart Accel Platform .
Message Property File¶
It is the file wherein messages are mentioned.
Naming conventions of file
{Arbitrary name} _ {Language ID} .properties
- Example
Language
File Name
English
example_en.properties
Japanese
example_ja.properties
Chinese
(Simplified)
example_zh_CN.properties
Warning
Do not enter underscore (_) in {Arbitrary name}.(Example) test_message_ja.propertiesFile contents
{Message code} = {Translated message}
Example
example_en.properties
I18N.MESSAGE.EXAMPLE=This is an example of message.example_ja.properties
I18N.MESSAGE.EXAMPLE=\u3053\u308c\u306f\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u4f8b\u3067\u3059\u3002