SuperMap iPortal and built-in WebApps both support multi-language environment. By default, Chinese and English bilingual configurations are provided. If the default languages cannot meet the usage environment, you can customize the portal site in a specific language according to your region and language habits.
Customize a new language for iPortal
The process is as follows:
- Write new language files
Step 1: Create a new language configuration file under %SuperMap iPortal_HOME%\webapps\iportal\resources\web-ui\config path, for example Language_ja.json. The file name followed by "Language_" can follow the corresponding "Filename" in the internationalization table of languages supported by iPortal. After the creation, fill in the file contents, the structure of which must be consistent with the corresponding Language_zh.json/Language_en.json file.
Step 2: Create a new language configuration file under %SuperMap iPortal_HOME%\webapps\iportal\resources\admin-ui\lang path, for example Language_ja.json. The file name followed by "Language_" can follow the corresponding "Filename" in the internationalization table of languages supported by iPortal. After the creation, fill in the file contents, the structure of which must be consistent with the corresponding Language_zh.json/Language_en.json file.
Step 3: Create a new language configuration file under the path %SuperMap iPortal_HOME%\webapps\iportal\resources\web-ui\config\locales\homePage, for example ja.json. The file name can follow the corresponding "Filename" in the internationalization table of languages supported by iPortal. After the creation, fill in the file contents, the structure of which must be consistent with the corresponding zh.json/en.json file.
Step 4: Enter %SuperMap iPortal_HOME%\webapps\iportal\WEB-INF\lib, create and add new language configuration files for each WebApps. The file name can follow the corresponding "Filename" in the internationalization table of languages supported by iPortal, for example, ja.json. The structure of file contents must be consistent with the corresponding zh.json/en.json file. And the files should be added to the paths shown as follows under the corresponding DataViz/DataInsights/MapDashboard jar package.
- DataViz: %DataViz_HOME%\META-INF\resources\apps\dataviz\static\nls
- DataInsights: %DataInsights_HOME%\META-INF\resources\apps\insights\language
- MapDashboard: %MapDashboard_HOME%\META-INF\resources\apps\mapdashboard\v2\static\locale
- BuilderX: %Builderx_HOME%\META-INF\resources\apps\builderx\static\locale
- iDesigner3D: %Designer_HOME%\META-INF\resources\apps\designer-3D\js\locale
- iEarth: %Earth_HOME%\META-INF\resources\apps\earth\v2\locale
- GPAModelBuilder: %GPAModelBuilder_HOME%\META-INF\resources\apps\gpamodelbuilder\locale
- MapStudio: %MapStudio_HOME%\META-INF\resources\apps\mapstudio\static\locales
Step 5: In the %SuperMap iPortal_HOME%\webapps\iportal\WEB-INF\lib path, go to the iportal-adminui-{version.number}.jar package, and create a new language configuration file in the META-INF\resources\admin-ui\locale\setup path. Using Japanese as an example, create a ja.json file. The file name can refer to the corresponding file name in the internationalization reference table of the Supported Languages in iPortal.
Step 6: In the %SuperMap iPortal_HOME%\webapps\iportal\WEB-INF\lib path, go to the authentication-ui-{version.number}.jar package, and create a new language configuration file in the META-INF\resources\apps\authentication-ui\static\locales path. Create a new language configuration file. Using Japanese as an example, create a ja.json file. The file name can refer to the corresponding file name in the internationalization reference table of the Supported Languages in iPortal.
Step 7: Fill in the content of the language configuration file. The file structure should be consistent with the default Language_zh.json / Language_en.json (or zh.json / en.json) provided in the same directory. Just change the specific content to the content corresponding to the new language.
Step 8: Save the configuration file.
- Import the new language files into iPortal
Step 1: Open the locales.json configuration file under the path %SuperMap iPortal_HOME%\webapps\iportal\resources\web-ui\config\locales\, the file structure is as follows:
{
"locales": [
{
"name": "zh",
"label": "中文"
},
{
"name": "en",
"label": "English"
}
],
"default": "en"
}
Add a new item to the locales item, where the value of the key "name" needs to be consistent with the name followed by the language configuration file name "Language_" created in previous steps, the value of the key "label" can be customized to indicate the language name displayed on the page. Taking Japanese as an example, the modified configuration file is as follows:
{
"locales": [
{
"name": "zh",
"label": "中文"
},
{
"name": "en",
"label": "English"
},
{
"name": "ja",
"label": "日本語"
}
],
"default": "en"
}
Step 2 (optional): Modify the default language. The parameter "default" in the locales.json file is used to specify the default display language of iPortal. Note: The "default" setting will only take effect when iPortal does not support the default language set in the user's browser. The priority of the iPortal default language display rules is: Browser Cookie > Browser default language > default value.
Step 3: Save the configuration file.
- Modify the language of the iPortal home page
Step 1: Log in to iPortal with your administrator account, navigate to Management > Site Configuration > Site customization page, click the "Home customize" link to enter the home page customization page.
Step 2: In the layout builder, modify the title and description text of each component on the homepage and save it.
Step 3: Restart iPortal. The bottom of the home page provides a drop-down box for multiple languages. Select the new language, then you can visit the new language iPortal site.
Note: Multi-language configuration does not take effect on the language of log files and prompt messages. You can modify the [SuperMap iPortal_HOME]\bin\catalina.bat(.sh) file to specify the display language of iPortal log files and prompt messages. For details, please refer to: FAQ.
Supported languages
The languages supported for customization in iPortal can be found in the following internationalization reference table:
| Language | Language Code | Filename |
| Arabic (Egypt) |
ar-EG |
ar |
| Azerbaijiani | az-AZ | az |
| Bulgarian (Bulgaria) | bg-BG | bg |
| Bengali (Bangladesh) | bn-BD | bn |
| belarusian | by-BY | by |
| Catalan (Spain) | ca-ES | ca |
| Czech (Czech Republic) | cs-CZ | cs |
| Danish (Denmark) | da-DK | da |
| German (Germany) | de-DE | de |
| Greek (Greece) | el-GR | el |
| English | en-GB | en-GB |
| English (American) | en-US | en |
| Spanish (Spain) | es-ES | es |
| Estonian (Estonia) | et-EE | et |
| Persian | fa-IR | fa |
| Finnish (Finland) | fi-FI | fi |
| French (Belgium) | fr-BE | fr-BE |
| French (Canada) | fr-CA | fr-CA |
| French (France) | fr-FR | fr |
| Irish | ga-IE | ga |
| Galician (Spain) | gl-ES | gl |
| Hebrew (Israel) | he-IL | he |
| Hindi | hi-IN | hi |
| Croatian | hr-HR | hr |
| Hungarian (Hungary) | hu-HU | hu |
| Armenia | hy-AM | hy |
| Indonesian (Indonesia) | id-ID | id |
| Icelandic (Iceland) | is-IS | is |
| Italian (Italy) | it-IT | it |
| Japanese (Japan) | ja-JP | ja |
| Georgian | ka-GE | ka |
| Khmer | km-KH | km |
| North Kurdish | kmr-IQ | kmr |
| Kannada | kn-IN | kn |
| Kazakh | kk-KZ | kk |
| Korean | ko-KR | ko |
| Lithuanian | lt-LT | lt |
| Latvian | lv-LV | lv |
| Macedonian | mk-MK | mk |
| Malayalam | ml-IN | ml |
| Mongolian (Mongolia) | mn-MN | mn |
| Malay (Malaysia) | ms-MY | ms |
| Norwegian (Norway) | nb-NO | nb |
| Nepali (Nepal) | ne-NP | ne |
| Dutch (Belgium) | nl-BE | nl-BE |
| Dutch (Netherlands) | nl-NL | nl |
| Polish (Poland) | pl-PL | pl |
| Portuguese (Brazil) | pt-BR | pt-BR |
| Portuguese (Portugal) | pt-PT | pt |
| Romanian | ro-RO | ro |
| Russian (Russia) | ru-RU | ru |
| Slovak (Slovakia) | sk-SK | sk |
| Slovenian (Slovenia) | sl-SI | sl |
| Serbian (Latin, Serbia) | sr-RS | sr |
| Swedish (Sweden) | sv-SE | sv |
| Tamil | ta-IN | ta |
| Thai (Thailand) | th-TH | th |
| Turkish (Turkey) | tr-TR | tr |
| Urdu (Pakistan) | ur-PK | ur |
| Ukrainian (Ukraine) | uk-UA | uk |
| Vietnamese (Vietnam) | vi-VN | vi |
| Chinese (Simplified) | zh-CN | zh |
| Chinese (Traditional) | zh-MO | zh-MO |
Independent Language Configuration
iPortal supports independent configuration of the log output language, built-in sample data language, and default UI display language by modifying the locale-config.xml configuration file to meet the needs of international users. The configuration method is as follows:
-
Open the locale-config.xml configuration file located in the %SuperMap iPortal_HOME%\webapps\iportal\WEB-INF folder, which contains three core configuration items:
<localeConfig>
<!-- Language used for logs -->
<subsequentLogLocale>zh-CN</subsequentLogLocale>
<!-- Language of default data -->
<dataLocale>zh-CN</dataLocale>
<!-- Language used for UI display -->
<uiLocale>zh-CN</uiLocale>
</localeConfig>
- <subsequentLogLocale>: Controls the language used for outputting iPortal system logs and operation logs (excluding logs of middleware such as Tomcat; see FAQ for its configuration method). It only takes effect for logs newly generated after the configuration takes effect; existing logs remain in their original language. The currently supported languages in iPortal can be found in Language Support. If other languages are configured, English logs will be output by default.
- <dataLocale>: Controls the language of iPortal built-in data, templates, and basemaps, including DataViz WebApp sample data, MapStudio WebApp templates, MapDashboard WebApp templates, and map basemaps. The currently supported languages for iPortal built-in data, templates, and basemaps can be found in Language Support. If other languages are configured, English built-in data, templates, and basemaps will be loaded by default.
- <uiLocale>: Controls the default UI display language when users first visit or are not logged in. After logging in, users can switch the UI display language in the navigation bar. The currently supported built-in UI languages in iPortal can be found in Language Support. If other non-extended languages are configured, the UI will display English by default.
- iPortal supports users to extend languages themselves. If this item is filled with other extended languages, the UI will display the corresponding extended language.
- If this item is left blank, the UI will follow the browser language settings by default. If the browser language is not supported, the UI will display English by default.
-
Save the configuration file and restart iPortal for the changes to take effect.
| Language | Language Code | Log Output Language | Built-in Data Language | UI Display Language |
| Chinese (Simplified) | zh-CN | ✓ | ✓ | ✓ |
| Chinese (Traditional) | zh-MO | ✓ | - | ✓ |
| English | en-US | ✓ | ✓ | ✓ |
| Spanish | es-ES | - | - | ✓ |
| French | fr-FR | - | - | ✓ |
| Arabic | ar | ✓ | - | ✓ |
Note:
-
The locale-config.xml file configuration does not take effect for the DataInsights WebApp. The UI language of the DataInsights WebApp follows the browser language settings and supports Simplified Chinese, English, French, and Spanish; when the browser language is an unsupported language such as Traditional Chinese or Arabic, the UI displays Simplified Chinese by default.
-
To preserve users' language usage habits from versions prior to 12.1.1, this configuration file does not affect the original default UI display language. If you install or launch iPortal for the first time in version 12.1.1 or later, the system will read the configuration in the locale-config.xml file as the default UI language setting.