intra-mart Accel Platform / TERASOLUNA Global Framework Programming Guide

Version 2 2014-01-01

«  Internationalization   ::   Contents   ::   Time Zone  »

Multi-Language

Summary

About Multi-Language Support

By the multi-language support, it means that the system supports the use of multiple languages rather than a single language.

Multi-Language Support in intra-mart Accel Platform

There are 4 elements that make up the multi-language support in intra-mart Accel Platform.
  • Language Definition
It defines the language used in intra-mart Accel Platform.
  • Message Definition
With regard to the messages to be shown to users, translated messages are available for all languages defined in intra-mart Accel Platform.
Message is managed by [Language ID] and [Message Code].
  • Language Resolution
Users can register the language to be used to intra-mart Accel Platform.
If the language is not registered, the language which is automatically resolved will be applied.
Please refer to Defined Access Context for the resolution sequence of language.
  • Obtaining the Message
intra-mart Accel Platform provides the API (MessageManager) to obatin the message with multi-language support.
MessageManager obtains the pertinent message from [Message Code] and [User Language].
For the usage of MessageManager, please refer to Get Message in Multi-Language Form.

Language Definition

Language Definition at Initial State

Languages that are supported in intra-mart Accel Platform at initial state are as follows :
Language Language ID
English en
Japanese ja
Chinese (simplified) zh_CN
  • Language Master File
Language defined in intra-mart Accel Platform is stated in XML named [Language Master File].
System default language at initial state will be [English].
  • Setting File
<CONTEXT_PATH>/WEB-INF/conf/locale-config/im-locale-default.xml

Message Definition

There are 3 elements that make up the message in intra-mart Accel Platform.
  • Message Code
This code is associated with the message contents.
Since the message code provided by intra-mart Accel Platform conform to the internal regulations, there is no need to understand the code system.
  • Language ID
Language defined in intra-mart Accel Platform is defined in the language master file as Language ID.
  • Translated Message
Translated messages are provided for the number of languages defined in intra-mart Accel Platform.

Message Property File

This file gives description of the message.
  • File Naming Conventions

    {arbitrary name} _ {language ID} .properties
    
    • example

    language

    File Name

    English

    example_en.properties

    Japanese

    example_ja.properties

    Chinese (simplified)

    example_zh_CN.properties

    Warning

    Please do not put underscore (_) in the {arbitrary name} part.

    (example) test_message_ja.properties
  • File 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
      

«  Internationalization   ::   Contents   ::   Time Zone  »