Localization Configuration

<< Click to Display Table of Contents >>

Current:  System Management  > System Attribute Configuration 

Localization Configuration

Previous pageReturn to chapter overviewNext page

Localization configuration not only supports names of user-defined data segment , but also allows users to customize some of the labels in the product.

Under any content such as E:\yonghong, to add three files: userlocale_en_US.properties, userlocale_zh_CN.properties and userlocale.properties. Then add the path of E:\yonghong to the setclasspath.bat of ..\tomcat\bin. For the above files, userlocale_en_US.properties matches the English environment of the product,  userlocale_zh_CN.properties matches the Chinese environment of the product, and userlocale.properties matches all environments. Apply the settings in userlocale.properties in any environment other than the Chinese and English environments; and give priority to the applications of settings in userlocale_zh_CN.properties and userlocale_en_US.properties; if the configuration is not set in these two files, the configuration in userlocale.properties will also be applied.

1. Name of user-defined data segment

The user can set it through the custom field: XXX= custom name, where the name is Chinese and the Chinese needs to be converted to unicode.

If the current environment of product is English, configure the data segment in userlocale_en_US.properties: 

ID=NO_CN

MARKET=Market_CN 

DATE=date 

SALES=a\u9500\u552e\u989d 

STATE=\u5dde

The ID is displayed as "NO_CN", MARKET is displayed as "Market_CN", SALES is displayed as "a销售额" , and STATE is displayed as "州", as shown in the figure:

localeconf1

2. User-defined Label

If the user needs the user-defined label, the user needs to add "g5_" in front of the product's label to complete the coverage, namely: g5_ label = user-defined name. If the corresponding value of the label is Chinese, the Chinese needs to be converted to unicode.

If the current environment of product is English, configure the following label in userlocale_en_US.properties:

g5_index.query=QUERY_CN

g5_index.editor=Dashboard_CN

g5_Export=EXPORT_CN

Create Data Set and Create Dashboard in navigation bar of the product will respectively displayed as "QUERY_CN" and "Dashboard_CN". The output in toolbar of the dashboard will be displayed as “EXPORT_CN”. 

The display of Create Data Set and Create Dashboard at the homepage of product, as shown below: 

localeconf2

When the dashboard is previewed in the product, the toolbar displays as shown:

localeconf3

 

Parameters dynamic.class.dir= It can realize the function of hot loading, dynamic.class.dir= Add userlocale after the equal sign_ En_ US.properties ,userlocale_ Zh_ CN.properties , userlocale.properties The path of the three files,Consistent with the path added by the classpath, the user bundle in the product will detect the expiration every 5 minutes. If it is expired, it will be reinitialized. That is to say, after the user modifies the file content, it can be refreshed in 5 minutes at the latest. There is no need to restart.