diff --git a/src/util/localization/index.ts b/src/util/localization/index.ts index 70e9d49e3..cdcb637a7 100644 --- a/src/util/localization/index.ts +++ b/src/util/localization/index.ts @@ -312,9 +312,9 @@ function createTranslationFn(): LangFn { } return processTranslation(key, variables as Record, options); }) as LangFn; - fn.code = language?.langCode || FORMATTERS_FALLBACK_LANG; + fn.rawCode = language?.langCode || FORMATTERS_FALLBACK_LANG; fn.isRtl = language?.isRtl; - fn.pluralCode = language?.pluralCode || FORMATTERS_FALLBACK_LANG; + fn.code = language?.pluralCode || FORMATTERS_FALLBACK_LANG; fn.with = (({ key, variables, options }: LangFnParameters) => { if (options && areAdvancedLangFnOptions(options)) { return processTranslationAdvanced(key, variables as Record, options); diff --git a/src/util/localization/types.ts b/src/util/localization/types.ts index 0d0e5ec1f..26cd09068 100644 --- a/src/util/localization/types.ts +++ b/src/util/localization/types.ts @@ -157,8 +157,8 @@ export type LangFn = { number: (value: number) => string; internalFormatters: LangFormatters; isRtl?: boolean; + rawCode: string; code: string; - pluralCode: string; languageInfo: ApiLanguage; };