MCPcopy
hub / github.com/grafana/grafana / getI18nInstance

Function getI18nInstance

packages/grafana-i18n/src/i18n.tsx:98–107  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

96}
97
98export function getI18nInstance(): typeof i18n {
99 // in Grafana versions < 12.1.0 the i18n instance is exposed through the default export
100 // used by plugins that support translations from Grafana >= 11.0.0
101 const instance: typeof i18n & { default?: typeof i18n } = i18n;
102 if (instance && instance.default) {
103 return instance.default;
104 }
105
106 return instance;
107}
108
109interface Module {
110 type: 'backend';

Callers 9

initDefaultI18nInstanceFunction · 0.85
initTranslationsFunction · 0.85
getLanguageFunction · 0.85
getResolvedLanguageFunction · 0.85
changeLanguageFunction · 0.85
addResourceBundleFunction · 0.85
tFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected