From a75c96d3e7d021f2c6348388a31beffd2f5f87a4 Mon Sep 17 00:00:00 2001 From: Vladislav Tasev Date: Mon, 27 Jul 2020 10:31:07 +0300 Subject: [PATCH] fix(framework): Take region into account for i18n assets (#1985) --- packages/base/src/asset-registries/i18n.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/base/src/asset-registries/i18n.js b/packages/base/src/asset-registries/i18n.js index 8a88501724ee..124022ace092 100644 --- a/packages/base/src/asset-registries/i18n.js +++ b/packages/base/src/asset-registries/i18n.js @@ -56,8 +56,9 @@ const fetchI18nBundle = async packageName => { } const language = getLocale().getLanguage(); + const region = getLocale().getRegion(); - let localeId = normalizeLocale(language); + let localeId = normalizeLocale(language + (region ? `-${region}` : ``)); while (localeId !== DEFAULT_LANGUAGE && !bundlesForPackage[localeId]) { localeId = nextFallbackLocale(localeId); }