I18n: Expose current UI language in @grafana/runtime config (#84457)

* I18n: Expose current UI language in Grafana config

* fix
This commit is contained in:
Josh Hunt
2024-03-18 11:00:43 +00:00
committed by GitHub
parent aa03b4393f
commit ed3bdf5502
4 changed files with 30 additions and 6 deletions
+2 -1
View File
@@ -42,7 +42,7 @@ import { setPanelDataErrorView } from '@grafana/runtime/src/components/PanelData
import { setPanelRenderer } from '@grafana/runtime/src/components/PanelRenderer';
import { setPluginPage } from '@grafana/runtime/src/components/PluginPage';
import { getScrollbarWidth } from '@grafana/ui';
import config from 'app/core/config';
import config, { updateConfig } from 'app/core/config';
import { arrayMove } from 'app/core/utils/arrayMove';
import { getStandardTransformers } from 'app/features/transformers/standardTransformers';
@@ -126,6 +126,7 @@ export class GrafanaApp {
parent.postMessage('GrafanaAppInit', '*');
const initI18nPromise = initializeI18n(config.bootData.user.language);
initI18nPromise.then(({ language }) => updateConfig({ language }));
setBackendSrv(backendSrv);
initEchoSrv();