The internationalization (i18n) system in Grafana enables the user interface to support multiple languages and regional formats. It provides translation of UI text, locale-aware formatting, and cultural adaptation. The system is based on key-based translation lookups, JSON locale files, and runtime translation functions.
For details on the specific structure of locale files and namespaces, see Locale Files, Namespaces, and Key Conventions. For details on the contribution and release process for translations, see Translation Workflow and Locale Coverage.
Grafana's i18n system is built on the i18next library and implemented as a key-based translation mechanism. Translation keys are mapped to localized strings in JSON files under public/locales/. The translation system is accessed at runtime via the @grafana/i18n package, which wraps i18next and react-i18next to expose the t() function for translation lookups. Language detection is handled by i18next-browser-languagedetector. Fallback to English is provided if a translation is missing.
Sources: public/locales/en-US/grafana.json1-3 public/locales/pt-BR/grafana.json1-3 public/locales/de-DE/grafana.json1-3 public/locales/it-IT/grafana.json1-3 public/locales/fr-FR/grafana.json1-3 public/locales/es-ES/grafana.json1-3
Translation files are located in the public/locales/ directory. Each supported locale has its own subdirectory containing a grafana.json file. All locale files use a consistent, hierarchical JSON structure.
Sources: public/locales/en-US/grafana.json1 public/locales/pt-BR/grafana.json1 public/locales/de-DE/grafana.json1 public/locales/it-IT/grafana.json1 public/locales/fr-FR/grafana.json1 public/locales/es-ES/grafana.json1
Each grafana.json file uses a nested object structure to organize translation keys by functional area. Top-level keys correspond to UI domains. For a full list of namespaces and naming conventions, see Locale Files, Namespaces, and Key Conventions.
| Top-Level Key | Purpose | Example Keys |
|---|---|---|
access-control | Permissions and RBAC UI | add-permission.title, permissions.role |
admin | Server administration interface | edit-org.heading, ldap.debug-title |
actions | Shared UI action elements | action-editor.label-url, params-editor.aria-label-add |
action-editor | Modal and button text for editors | modal.save-button, modal.cancel-button |
Translation entries support interpolation via double curly braces (e.g., {{identifier}}) public/locales/en-US/grafana.json24 and pluralization public/locales/en-US/grafana.json2
Sources: public/locales/en-US/grafana.json3-179 public/locales/it-IT/grafana.json3-179 public/locales/de-DE/grafana.json3-179 public/locales/fr-FR/grafana.json3-179 public/locales/es-ES/grafana.json3-179
Many internationalized features are gated by feature toggles. These toggles are defined in pkg/services/featuremgmt/registry.go pkg/services/featuremgmt/registry.go19-150 and automatically synchronized to the frontend via generated code.
Key generated constants for feature management:
FlagPanelTitleSearch pkg/services/featuremgmt/toggles_gen.go12FeatureToggles.panelTitleSearch packages/grafana-data/src/types/featureToggles.gen.ts25Owner and Stage pkg/services/featuremgmt/registry.go23-24Sources: pkg/services/featuremgmt/registry.go1-27 pkg/services/featuremgmt/toggles_gen.go1-15 packages/grafana-data/src/types/featureToggles.gen.ts1-25
The source of truth for English phrases is the frontend source code itself public/locales/en-US/grafana.json2 Translations for other locales are managed through JSON files and integrated into the release cycle.
t() or <Trans />.public/locales/en-US/grafana.json.public/locales/it-IT/grafana.json public/locales/it-IT/grafana.json1-10For details on the review process and CI interaction, see Translation Workflow and Locale Coverage.
Sources: public/locales/en-US/grafana.json2 public/locales/it-IT/grafana.json2 public/locales/fr-FR/grafana.json2 public/locales/es-ES/grafana.json2