Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This document describes how to create a system service and setup a Nexaweb Java application to
display text and messages in multiple languages.

Overview

The process of internationalizing an application to display text and messages in multiple languages requires the following major steps:

  • Create a system service to allow the application language to be selectable.
  • Create property files with key value pairs as resource bundles.
  • Register the system service.
  • Set the value of component text attributes with resolution syntax corresponding to the keys
    defined in property files

Creating a System Service

The following is an example of a system service container for internationalizaton:

...

Code Block
public String getValue(String key) { 
	String value = resBundle.getString(key); 
	if (value == null) { 
		value = ""; 
	} 
	return value; 
}

Creating Property Files

Create separate property files for each locale the application supports as your resource bundles.

...

  • Create properties files for other languages including the same keys and the language-specific values.
  • Place the properites file in the project\WebContent\WEB-INF\client\classes directory.

UI File

You must include in the UI file a call to the MCO that registers the system service similar
to the following:

...