Internationalization helpers exposed through AsukaDesigner.util.

interface AsukaI18nApi {
    addTranslations: ((locale: string, bundle: Translations) => void);
    getFallbackLocale: (() => string);
    getLocale: (() => string);
    setFallbackLocale: ((locale: string) => void);
    setLocale: ((locale: string) => void);
    t: ((key: string, params?: Record<string, string | number>) => string);
}

Properties

addTranslations: ((locale: string, bundle: Translations) => void)

Add or replace a locale bundle at runtime.

getFallbackLocale: (() => string)

Return the fallback locale used for missing translations.

getLocale: (() => string)

Return the current locale.

setFallbackLocale: ((locale: string) => void)

Change the fallback locale used for missing translations.

setLocale: ((locale: string) => void)

Change the current locale.

t: ((key: string, params?: Record<string, string | number>) => string)

Translate a key using the active locale and fallback chain.