Internationalize the Splunk Web user interface.
- Set language/locale specific alternatives for static resources such as images, CSS, other media.
- Create new languages or locales.
- Format times, dates and other numerical strings.
Splunk software translation
Splunk software uses the language settings for the browser where you are accessing Splunk Web. You can change the browser language settings to see the user interface in another language.
Locale strings indicate the language and location that Splunk software uses to translate the user interface. Typically, a locale string consists of two lowercase letters and two uppercase letters linked by an underscore. For example,
en_US means American English while
en_GB means British English.
Splunk software first tries to find an exact match for the full locale string but falls back to the language specifier if settings are not available for the full locale. For example, translations for
fr answer to requests for
fr_FR (French, Canada and France respectively).
In addition to language, translation also addresses the formatting of dates, times, numbers, and other localized settings.
Splunk software uses the
gettext internationalization and localization (i18n) system.
- Create a directory for the locale. For example, to create the fictional locale
mz, create the following directory.
- Load the following
messages.potfile into your PO editor.
- Use the PO editor to translate any strings that you want to localize. Save the file as
messages.poin the directory you created in the previous step. The PO editor also saves a
messages.mofile, which is the machine readable version of the PO file.
- Restart the Splunk instance. No other configuration file edits are required. Splunk software detects the new language files when it restarts.
The Splunk platform stores localization information at the following location.
This directory contains the following items.
messages.pot: Holds the strings to translate. You can use a PO editor to edit these files.
<locale_string>: Directory containing localization files for the locale specified by
<locale_string>/LC_MESSAGES/messages.po: Contains the source strings specified for localization in
messages.pot. Using a PO editor, provide the translations for these strings.
<locale_string>/LC_MESSAGES/messages.mo: Machine readable version of
messages.po. Splunk software uses this file to find translated strings. The PO editor creates the file for you when it creates the
Localize dates and numbers
You can format numbers and dates to the standards of a locale without translating any text. Create a directory for the locale whose numbers and dates you want to format. Copy the contents of the
en_US directory to the target locale directory.
Enable localization of numbers and dates for the
de_CH locale (German – Switzerland).
Create the following target directory for the
Copy the contents of the following directory.
Copy the contents from the
en_US directory into the
You can use
gettext to translate apps. Most apps must be translated in their own locale subdirectory.
Apps that ship with the Splunk platform are automatically extracted and their text is included in the core
messages.pot file. You do not need to handle them separately.
To extract the strings from an installed app and make the strings ready for translation in a PO editor, run the following extraction command on the command line.
> splunk extract i18n -app <app_name>
This creates a
locale/ subdirectory in the app root directory and populates it with a
Follow the steps above to translate the strings within the app. When using views from a different app, the new
messages.pot file contains the strings for these views.
The Splunk platform stores static resources such as images, CSS files, and other media as subdirectories at the following location.
When serving these resources, Splunk software checks to see whether a localized version of the resource is available before falling back to the default resource. For example, if your locale is set to
fr_FR, Splunk software searches for the logo image file in the following order.
Splunk software follows the same path to load HTML templates (including any views) that define each page in the UI. This can be useful for languages that require a modified layout that CSS alone cannot accommodate (right to left text for example).
Customize dashboard styling and behavior
This documentation applies to the following versions of Splunk Cloud Platform™: 8.1.2103, 8.2.2106, 8.2.2107, 8.2.2105, 8.2.2109, 8.2.2111, 8.2.2112, 8.2.2201 (latest FedRAMP release), 8.2.2202, 8.2.2203