From 86e81dcd05cfe6ae13b415383eccade3d502a9ef Mon Sep 17 00:00:00 2001 From: William Oldham Date: Sat, 6 Jan 2024 12:31:22 +0000 Subject: [PATCH] Use populate language code for country code method --- src/utils/language.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/language.ts b/src/utils/language.ts index 94837660..1b60dac3 100644 --- a/src/utils/language.ts +++ b/src/utils/language.ts @@ -126,7 +126,7 @@ export function sortLangCodes(langCodes: string[]) { */ export function getCountryCodeForLocale(locale: string): string | null { let output: LanguageObj | null = null as any as LanguageObj; - const tag = getTag(locale, true); + const tag = getTag(populateLanguageCode(locale), true); if (!tag?.language?.Subtag) return null; // this function isn't async, so its guaranteed to work like this