Skip to content

Commit

Permalink
fix(base): add local variant for language loading (#7968)
Browse files Browse the repository at this point in the history
  • Loading branch information
pskelin authored Dec 6, 2023
1 parent e24f294 commit 440cf48
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/base/src/asset-registries/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ const useFallbackBundle = (packageName: string, localeId: string) => {
const fetchI18nBundle = async (packageName: string) => {
const language = getLocale().getLanguage();
const region = getLocale().getRegion();
let localeId = language + (region ? `-${region}` : ``);
const variant = getLocale().getVariant();
let localeId = language + (region ? `-${region}` : ``) + (variant ? `-${variant}` : ``);

if (useFallbackBundle(packageName, localeId)) {
localeId = normalizeLocale(localeId);
Expand Down

0 comments on commit 440cf48

Please sign in to comment.