Internationalization and localization support
In Siren Investigate, only a select subset of elements can be translated. To report any problems with this feature or to request further information, contact Siren.
Siren Investigate supports localization for the following languages and locales:
Language |
Locale name |
English |
en |
Spanish |
es |
French |
fr |
German |
de |
Japanese |
ja |
Korean |
ko |
Chinese |
zh |
Arabic |
ar |
Internationalization is enabled in both the core application and the core plug-ins.
To use this feature, you must generate a translation file and replace the values inside it with the language of the required locale.
If you have any additional custom plug-ins, you must also enable internationalization support for them.
Localizing Siren Investigate
To customize Siren Investigate to a particular locale, you must generate a locale file for the core application.
Steps
-
Go to
siren-investigate
, open a Terminal window and run the following command:node scripts/i18n_extract --output-dir translations
This command generates a file called
en.json
in thesiren-investigate/translations
folder. Theen.json
file contains amessages
object, which contains - at a minimum - the following code in English (the default language):"messages": { "kbn.dashboard.options.darkThemeCheckbox": "Use dark theme", "kbn.dashboard.options.hideBordersCheckbox": "Hide borders" }
-
Rename the file to
<locale_name>.json
, where the<locale_name>
is one of the supported locale names in the table above. -
Open the
investigate.yml
file and make sure that thei18n.locale
value is set to<locale_name>
. If thei18n.locale
key is not already in theinvestigate.yml
file, add the key and save the file. -
In the
<locale_name>.json
file, replace the text strings in themessages
object with translated text strings.
Do not change the keys or any of the parameters inside the curly brackets. |
To translate a string that can be either singular or plural, follow the guidelines around pluralization here. |
Localizing the core plugins
To customize the core plugins to a particular locale, you must generate a locale file for each one of them.
Localization is supported for the following core plugins:
-
Access Control
-
Sentinl
-
License
-
Ingest
-
Machine Learning
-
Web services
Steps
-
In the
siren-investigate
folder, open a Terminal window and run the following command for each of the core plugins:node scripts/i18n_extract --path siren_plugins/<plugin_name> --output-dir siren_plugins/<plugin_name>/translations
Running this command generates an
en.json
file in thetranslations
folder of each plugin. -
Replace the values in the
messages
object in all of the files and save the file as<locale_name>.json
. -
Restart the server.
-
Start the application to see the translated strings in the user interface.
Localizing custom plugins
Before you begin, see the Kibana I18n Tools guidelines and follow the instructions to add the keys and default messages.
Steps
-
After you add the keys and default messages, add the following statement to the root
.js
file of the plugin (app.js
orindex.js
):import ui/i18n;
This statement initializes the
i18n
provider. -
At the root of your plugin, create a folder called
translations
and a file called.i18nrc.json
. Both the folder and the file can remain empty for now. -
Install the plugin in
siren-investigate
as usual. -
After the installation is complete, go to the
siren-investigate
folder, open a Terminal window, and run the following command:node scripts/i18n_extract --path siren_plugins/<your_plugin_name> --output-dir siren_plugins/<your_plugin_name>/translations
If no errors are found, the command creates an
en.json
file in the newtranslations
folder of your plugin. This file contains all the keys that were added to the plugin to support translations. -
Replace the values in the
messages
object in all of the files and save the file as<locale_name>.json
. -
Open the
.i18nrc.json
file in the plugin and add the following object:{ "translations": [ "translations/your_locale_name.json" ] }
-
Restart the server.
-
Start the application to see the translated strings in the user interface.
To avoid problems starting the application, ensure the following:
|