Multi-language configuration

Feedback


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:

  1. 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_" must 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_" must 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 must 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 must 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.

Step 5: Enter %SuperMap iPortal_HOME%\webapps\iportal\WEB-INF\lib, create and add a new language configuration file to the META-INF\resources\admin-ui\locale\setup path of the iportal-adminui-{version.number}.jar package, for example, ja.json. The file name must follow the corresponding "Filename" in the internationalization table of languages supported by iPortal. And the structure of file contents must be consistent with the corresponding zh.json/en.json file.

  1. 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.

  1. 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

iPortal currently supports 62 languages for customization. For details, please refer to the following internationalization comparison 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 (China) zh_CN zh