How To: Add a New Language to a Portal Using the GIS Portal Toolkit 3.1
Instructions provided describe how to enable new languages in a metadata Portal implemented using the GIS Portal Toolkit.
The GIS Portal Toolkit version 3.1 is available in five (5) languages by default: German, Spanish, French, Dutch and Chinese. GPT 3.1 can be customized for use in nearly any language. The following steps outline necessary modifications to enable new non-English languages in the GPT:
Take note of the language suffix of the language specified in the Web browser when the language settings are changed. For example, the suffix for 'Arabic-Egypt' is 'ar-eg'.
The Portal can recognize any number of additional languages by the existence of language resource files that are present in its \\Portal\WEB-INF\classes folder. By default, this folder contains five (5) files with the prefix 'gpt_' and have the '.properties' extension. Each is a version of the 'gpt.properties' file translated into German, Spanish, French, Dutch or Chinese.
To add a new language to the GPT, translate the 'gpt.properties' file into the language of interest.
Save the translated file with a filename similar to the other language files. For example, the 'Arabic-Egypt' file would be saved as 'gpt_ar_eg.properities'. Remember to use underscores and not dashes in the filename.
Place the translated file in the same folder as the 'gpt.properties' file. The Portal looks for a 'gpt.properties' file that matches the language of the Web browser's language settings, and finds the newly created language file. If it cannot find the file or if there is a problem with it, the Portal defaults to use the original 'gpt.properties' file, which is in English by default.
If characters of the new language are not within the ISO 8859-1 character set, the translated file must specify all 'external' characters in their Unicode equivalents. Make a backup copy of the file in case there are errors and translate the file to Unicode. A Java utility that translates text files to Unicode is available at the following link: http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/native2ascii.html
Save the file again with the same filename used before the Unicode translation, and double-check that it is in the \\Portal\WEB-INF\classes\ folder.
From step 1 above, the language settings in the Web browser should already be set to the language of choice. Launch the Portal in a Web browser and it should display in the newly added language.