From a817fd0e56ac3bf7025a6e88fbefa58a18126374 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Tue, 27 Feb 2024 21:33:02 +0100 Subject: [PATCH] Also export locales from I18n module This may let plugins authors and users to interact with the registered translations. --- src/core/I18n.js | 2 +- src/core/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/I18n.js b/src/core/I18n.js index 823a8b0bc..74133231d 100644 --- a/src/core/I18n.js +++ b/src/core/I18n.js @@ -6,7 +6,7 @@ import * as Util from './Util.js'; * Utility functions to deal with translations. */ -const locales = {}; +export const locales = {}; // @property locale: String // The current locale code, that will be used when translating strings. diff --git a/src/core/index.js b/src/core/index.js index 7902d3d52..43b49d8f7 100644 --- a/src/core/index.js +++ b/src/core/index.js @@ -2,7 +2,7 @@ export {default as Browser} from './Browser.js'; export {Class} from './Class.js'; export {Evented} from './Events.js'; export {Handler} from './Handler.js'; -export {locale, translate, setLocale, registerLocale} from './I18n.js'; +export {locale, locales, translate, setLocale, registerLocale} from './I18n.js'; import * as Util from './Util.js'; export {Util};