Development tools : XUI editor : Editing an XUI page : Editing the properties of the XUI widgets : NLS support
  
NLS support
National Language Support (NLS) is responsible for character and language conversion according to the configured language.
With the support of NLS, UDTT applications are able to display in different languages according to customers' requirements without further translation. This is because an NLS element consists of a value and a key. Different languages refer to different values while they share the same key.
By default, NLS is parsed on the client side. You can move the NLS loading work to the server side by changing the settings in the btt.xml file. For more information, see ‘UDTT definition description’ on page 162NLS loading configuration.
This graphic is described in the surrounding text.
Search Bar
This bar can help users to invoke a search throughout the whole workspace.
Advanced Options
This module can help users to search under more specific requirements.
Language Option
The option list includes all the language locales of all the properties files in the workspace. This option can identify the specific language users want to use.
Case sensitive Option
This option can determine whether to follow the capital and lower case of the search criteria.
Diacritical marks sensitive Option
This option can determine whether to ignore the diacritical marks of the search criteria.
File List
This list can help user to view NLS properties and select specific properties file. User will need to import some multinational properties files into the NLS folder in advance in order to access the required NLS files.
Keyword Bar
This bar can help user to invoke a search in one file selected from File List.
Element List
This list is used to display the key and value of NLS properties file.
The usage of the five modules, refer to Using NLS elements.
Editing Buttons
This module is used to edit NLS files.
For more information, see Editing NLS files.
See
Launching the NLS window
Using NLS elements
Editing NLS files
Tutorial: Using NLS for Korean interface display
See also
Editing the properties of the XUI widgets
Launching the NLS window
There are generally two scenarios to use NLS: in XUI file and in transaction file.
In XUI file
Widget properties
NLS can help user to update the language for text or hint properties of widgets, including
Label, Button, and Link widgets which possess the text and hint properties.
Text and Table column when the data name is set as string type, and TextArea.
Note Normally, the latter group is not recommended to bundle NLS. In some specific scenario which need to bundle NLS with these widgets, it is only recommended to use NLS for message display. Otherwise, submission, validation or other data management would lead to logical contradiction.
Choices
Double-click the widget that has the NLS.
Right click the project in the UDTT Project Explorer, and then click BTT Tools > NLS editor.
Click the widget and turn to the Properties view. Click Browse in the Value column.
This graphic is described in the surrounding text.
ECA rules
When defining Condition in an ECA rule, you could use NLS to define the left and right value in Expression as well as the multilanguage string value in Global Function.
If select Constant, select NLS as Type of Constant and then click Browse to define the value:
This graphic is described in the surrounding text.
In transaction file
Condition State
In transaction files, users can use NLS when defining condition state. Compared with defining Condition in an ECA rule, the procedure is generally alike. You could also define the left and right value in Expression as well as the multilanguage string value in Global Function.
This graphic is described in the surrounding text.
Input/output mapping
Users can also use NLS when defining input/output mapping for a transition. Compared with defining Condition in an ECA rule, the procedure is generally alike.
This graphic is described in the surrounding text.
For more information about using the Please select an NLS file window, see Using NLS elements and Editing NLS files.
Display result
If you successfully select a NLS element, the content will be displayed like this:
This graphic is described in the surrounding text.
See also
NLS support
Using NLS elements
The following instruction helps you to better understand how to quickly find the key or value you want.
There are two ways to search for NLS element you want: Search inside workspace and Search inside file. Note that when you chose to search inside workspace, Keyword Bar would be disabled so that you can't search inside file.
In both ways, you can use Advanced options for smarter search:
Select a language locale in the language bar (see NLS support). This means the search will be done only on files with that locale.
Choose case sensitive or not.
Choose diacritical marks sensitive or not. "Diacritical sensitive" means the search will be done only on those have the exact diacritical marks.
Search inside workspace
Its basic functionality is to allow users search for a text among all the properties files in the workspace. The following procedure provides detailed steps:
Type a value in the input text box of the Search Bar. Then the search button is activated.
Click the search button or press Enter to invoke the search. The window searches the input text on both key and value elements of all the properties files in the workspace. During the execution, a progress bar appears, showing the number or files with properties that match the search criteria, and the file name that is being scanned at that moment.
This graphic is described in the surrounding text.
If the search criteria has one or more match, the File List panel on the left would list all the files that have the matched element, each file with a number in the right bracket that corresponds to the number of occurrences in that file. And the Element List on the right would list all the properties that match the criteria. At the bottom of the window, there is a message indicating that user should select a property value from the list to proceed.
This graphic is described in the surrounding text.
If the search criteria has no match, a message informing the situation is raised and no element is shown. Then you can return to the initial state by pressing Reload or Cancel button on the Search Bar. You can refer to more information about them in the last two section of this page.
Search inside file
Its basic functionality is to allow users search for a text in one selected file. The following procedure provides detailed steps:
1 Firstly select a file from File List panel. Then Element List would display all the NLS elements in the selected file. If the file has a short list, you can directly select the NLS element from the list. If the list is long, you can go on to invoke Search inside file.
2 Input a value in the input text box of the Keyword Bar. Element List would display the match result instantly as you type. If there is no match, Element List would be blank.
3 Clear the input text box or select another file would start another Search inside file.
Reload
Reload means the window returns to the initial state that no property file or property value is selected. You can click the reload button at the Search Bar.
This graphic is described in the surrounding text.
If there is a file selected on the left side, user “Ctrl+Click” on that file, the behavior is the same as clicking the reload button. If user takes any of these two actions, the result will be:
This graphic is described in the surrounding text.
Cancel
Cancel means the window returns to the initial state that no search was done. You can click the cancel button at the Search Bar.
This graphic is described in the surrounding text.
The result will be:
This graphic is described in the surrounding text.
See also
NLS support
Editing NLS files
You can use Editing Buttons to add a new NLS file, delete an existing NLS file, and edit a NLS file.
This graphic is described in the surrounding text.
You need to select a NLS element from Element List before, so that Editing Buttons get activated.
Add a new NLS file
Click the Add button and the following dialog will display:
This graphic is described in the surrounding text.
Type the key and value, and then click OK. The key and value display in the current Element List.
Delete an existing NLS file
Click the Delete button. The selected key and value are deleted in the dialog window.
Edit a NLS file
Click the Update button and relative update dialog will display as the following shows:
This graphic is described in the surrounding text.
Change the key and value, and then click OK. The update result appears in the Element List panel.
See also
NLS support
Tutorial: Using NLS for Korean interface display
UDTT uses a group of NLS property files to switch between multi-language interfaces. One file is for one language with a set of values (backend content) in this language pointing to relative keys (ID). In this tutorial, we will take Korean interface as an example to teach you how to use and configure NLS.
See
Creating a NLS file
Setting the language locale for IE browser
Previewing the page
Customizing the Client-side JavaScript validation message
See also
NLS support
Creating a NLS file
1 Create a new properties file in the location of NLS folder. Name the file in this way [ProjectName]_[ language]_[locale].properties.
Use the list of language locale to indicate the language:
en_US (English)
zn_CN (Mandarin)
es_ES (Spanish)
ja_JP (Japanese)
fr_FR (French)
ko (Korean)
For example, the Korean NLS property file name for bttsample should be named as bttsample_ko.properties.
This graphic is described in the surrounding text.
2 Add new NLS items for this file. Here we take text property of a label widget as an example. Open index.xui file and click on browse of the label properties. For more ways to use NLS, see Launching the NLS window.
This graphic is described in the surrounding text.
3 Click on the file bttsample.properties and Select language locale, ko.
This graphic is described in the surrounding text.
4 Click Add, and then enter the new item in the dialog box.
This graphic is described in the surrounding text.
You can provide values with parameters whenever an NLS property is being edited. If the value text has parameters, the parameters box is displayed:
Parameter
If parameters are required, the OK button is disabled until parameter values are provided.
5 Repeat step 2 to 4 to add new items for the NLS file.
6 Select the item you want to link to the widget, and then click OK.
7 Save the index.xui file.
See also
Tutorial: Using NLS for Korean interface display
Setting the language locale for IE browser
1 Open the browser, and select Tools > Internet Options.
This graphic is described in the surrounding text.
2 Click the General tab, and then click Languages. In the Language Preference dialog box, click Add.
This graphic is described in the surrounding text.
3 Select Korean. Move it to the top, and then click OK.
This graphic is described in the surrounding text.
This graphic is described in the surrounding text.
See also
Tutorial: Using NLS for Korean interface display
Previewing the page
1 Right-click the blank space in the editing area, and then click Page Preview.
2 Click ko.
This graphic is described in the surrounding text.
Result
This graphic is described in the surrounding text.
See also
Tutorial: Using NLS for Korean interface display
Customizing the Client-side JavaScript validation message
UDTT uses Dojo to provide basic client-side validations. If you want to customize the validation message, you can override the default message in relative JavaScript file.
1 In the Java EE perspective, expand the directory WebContent > js > dojo > nls from Project Explorer.
2 Choose the language file. In this case, open dojo_ko.js.
This graphic is described in the surrounding text.
3 Find the validation message and rewrite it between double quotation marks.
This graphic is described in the surrounding text.
See also
Tutorial: Using NLS for Korean interface display