Component Definition of Internationalization Services
I18nComponentLocales<LocaleName, BaseLocale, LocaleMeta, Translations, DateTimeFormats, RelativeTimeFormats, NumberFormats, ListFormats, Dependencies>
Map settings for component locales or their asynchronous loaders
Dependencies
Map of dependent components that can be registered in the spaces and components of the internationalization service
(space: I18nSpace<LocaleName, BaseLocale, LocaleMeta>): I18nComponent<LocaleName, BaseLocale, LocaleMeta, Translations, DateTimeFormats, RelativeTimeFormats, NumberFormats, ListFormats, Dependencies>
Create a component instance
Name | Type | Default |
---|---|---|
space* | I18nSpace<LocaleName, BaseLocale, LocaleMeta> | |
Internationalization Space |
I18nComponent<LocaleName, BaseLocale, LocaleMeta, Translations, DateTimeFormats, RelativeTimeFormats, NumberFormats, ListFormats, Dependencies>
Create a component instance
(...locales: LocaleName[]): Promise<void>
Load the specified locale
Name | Type | Default |
---|---|---|
locales | LocaleName[] | |
List of locale names |
Promise<void>
Load the specified locale
Internationalization Service Components
I18nComponentStatic<LocaleName, BaseLocale, LocaleMeta, Translations, DateTimeFormats, RelativeTimeFormats, NumberFormats, ListFormats, Dependencies>
component definition
I18nSpace<LocaleName, BaseLocale, LocaleMeta>
Internationalization Space
Readonly<{ [Name in keyof Dependencies]: ReturnType<Dependencies[Name]["createInstance"]>; }>
Instantiated component map
Translations
Translation object corresponding to the currently selected locale
Translations
Translation object corresponding to the currently selected locale
this.trans
.(localeName: LocaleName): Translations
Obtains the translation object corresponding to the specified locale name
Name | Type | Default |
---|---|---|
localeName* | LocaleName | |
locale name |
Translations
Obtains the translation object corresponding to the specified locale name