Internationalization is the process of designing an application so that it can be adapted to various languages and regions without engineering changes. Sometimes the term internationalization is abbreviated as i18n, because there are 18 letters between the first "i" and the last "n."
An internationalized program has the following characteristics:
1. With the addition of localized data, the same executable can run worldwide.
2. Textual elements, such as status messages and the GUI component labels, are not hardcoded in the program. Instead they are stored outside the source code and retrieved dynamically.
3. Support for new languages does not require recompilation.
4. Culturally-dependent data, such as dates and currencies, appear in formats that conform to the end user's region and language.
It can be localized quickly.
Sample Code :
1. First get the Locale data's like country language.
String language="en";
String country="US";
currentLocale = new Locale(language, country);
2. Before that we should create the message bundle (It's nothing but properties file which is include the content of page)
MessagesBundle.Properties
MessagesBundle_de_DE.properties
MessagesBundle_en_US.properties
3. Once it's created ,you can access the message bundle based on locale using the ResourceBundle.
ResourceBundle messages =ResourceBundle.getBundle
("MessagesBundle",currentLocale);
System.out.println(messages.getString("greetings"));
Showing posts with label Localization. Show all posts
Showing posts with label Localization. Show all posts
Tuesday, July 8, 2008
Friday, April 18, 2008
Message Catalogs
A message catalog is an XML file that contains a collection of text messages. Usually, an application uses one message catalog to contain a set of messages in a default language and optional, additional catalogs to contain messages in other languages.
To create and edit a properly formatted message catalog, use the WebLogic Message Editor utility, which is a graphical user interface (GUI) that is installed with WebLogic Server. To create corresponding messages in local languages, use the Message Localizer, which is also a GUI that WebLogic Server installs.
To access the Message Editor, do the following from a WebLogic Server host:
1. Set the Environment Variables .
WL_HOME\server\bin\setWLSEnv.cmd
2. Run the following command to open the editor
java weblogic.MsgEditor
After that you can create/edit/delete the mesage catalog using this editor.
To create and edit a properly formatted message catalog, use the WebLogic Message Editor utility, which is a graphical user interface (GUI) that is installed with WebLogic Server. To create corresponding messages in local languages, use the Message Localizer, which is also a GUI that WebLogic Server installs.
To access the Message Editor, do the following from a WebLogic Server host:
1. Set the Environment Variables .
WL_HOME\server\bin\setWLSEnv.cmd
2. Run the following command to open the editor
java weblogic.MsgEditor
After that you can create/edit/delete the mesage catalog using this editor.
Labels:
i18n,
Internationalization,
Localization,
Message Catalogs,
Weblogic
Subscribe to:
Posts (Atom)