The Dashboard Server comes with one Web interfacesinterface, namely the Portal. The following steps show instructions provide an example of on how to localize the Portal app to appear in Spanish.
Changing
Table of Contents |
---|
Step 1 - Change the browser settings
- Follow the instructions provided in your Web browser's user guide and set the browser's language
...
- based on your preference.
For example, in Google Chrome, you can set the language
...
- by navigating to Settings, then Show advanced settings
...
- , and clicking on Languages menu.
- Set the browser's encoding type to UTF-8.
...
Step 2 - Localize the strings in WSO2 Dashboard Server
- Navigate to the
<DS_HOME>/repository/deployment/server/jaggeryapps/portal
...
- directory where
<DS_HOME>
...
- is the WSO2 Dashboard Server distribution's home.
Create a new file by the name
locale_{lolcaleCode}.json
inside the<DS_HOME>/repository/deployment/server/jaggeryapps/portal/extensions/locales
directory to localize the Dashboard Server to your preferred language.
Based on this example, as the language set in the browser is Spanish, the locale code ises
and the file name should belocale_es.json
.Info There is only one type of resource file
...
that defines the localization strings in
...
WSO2 Dashboard Server.
...
The resource file is
...
a
.json
...
file with the following name
...
format -
locale_{language_code}.json
...
(e.g., to make Sinhalese available you can name the JSON file as
locale_si.json
). Each locale has a
...
separate
.json
...
file, and these files are located in the
<DS_HOME>/repository/deployment/server/jaggeryapps/portal/extensions/locales
directory. These resource files are used to store the strings defined
...
in
.jag
...
files and client-side
...
JavaScript files according to browser locale.
...
Furthermore, WSO2 Dashboard Server uses its in-built script module
...
i18n to implement the localization support for Jaggery. For more information,
...
...
Add the key-value pairs in the resource file, which in this example is the
locale_es.json
file.
...
Info - For an example on adding key value pairs, refer to
...
- the default
...
- resource file for WSO2 Dashboard Server, which is namely the
<DS_HOME>/repository/deployment/server/jaggeryapps/portal/extensions/locales
- resource file for WSO2 Dashboard Server, which is namely the
...
/locale_default.json
file.In addition, a section of a sample
locale_es.json
file is shown below for your reference.Code Block { "edit.button": "editar", "logout.label": "Cerrar sesión", "login.label": "Iniciar sesión", "username": "Nombre de usuario", "password": "Contraseña", "create.page.label": "Crear página", ....