LocalizationService
Popii / LocalizationService
Class: LocalizationService
Section titled “Class: LocalizationService”Defined in: localization/index.ts:3
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new LocalizationService(
defaultLocale?,fallbackLocale?):LocalizationService
Defined in: localization/index.ts:5
Parameters
Section titled “Parameters”defaultLocale?
Section titled “defaultLocale?”string = "en-US"
fallbackLocale?
Section titled “fallbackLocale?”string = defaultLocale
Returns
Section titled “Returns”LocalizationService
Methods
Section titled “Methods”register()
Section titled “register()”register(
locale,dictionary):LocalizationService
Defined in: localization/index.ts:6
Parameters
Section titled “Parameters”locale
Section titled “locale”string
dictionary
Section titled “dictionary”Record<string, string>
Returns
Section titled “Returns”LocalizationService
translate()
Section titled “translate()”translate(
locale,key,args?):string
Defined in: localization/index.ts:7
Parameters
Section titled “Parameters”locale
Section titled “locale”string
string
Record<string, string | number> = {}
Returns
Section titled “Returns”string
missing()
Section titled “missing()”missing(
locale):string[]
Defined in: localization/index.ts:8
Parameters
Section titled “Parameters”locale
Section titled “locale”string
Returns
Section titled “Returns”string[]
Properties
Section titled “Properties”defaultLocale
Section titled “defaultLocale”
readonlydefaultLocale:string="en-US"
Defined in: localization/index.ts:5
fallbackLocale
Section titled “fallbackLocale”
readonlyfallbackLocale:string=defaultLocale
Defined in: localization/index.ts:5