New to Kendo UI for Vue? Start a free 30-day trial
Using the
Applying the
Services
The Internationalization package exposes IntlService
service for default and customized internationalization of locales and LocalizationService
for providing messages based on the current language.
Using the IntlService
in Components
To use the service in your own components:
- Use the
IntlProvider
component in your parent component. - If you require locale data that is different from the default
en-US
locale data, load the data you need in your parent component. - Inject the
IntlService
in your child component using the below code:
js
inject: {
kendoIntlService: { default: null },
}
- Access the
IntlService
in the child component by using theprovideIntlService
function.
Change Theme
Theme
Loading ...
Applying the LocalizationService
in Components
The toLanguageString
method of the LocalizationService
accepts a key and a default value. To use the LocalizationService
in your own components in conjunction with the LocalizationProvider
:
- Use the
LocalizationProvider
component in your parent component. - Set the
language
property. - Inject the
Localization Service
in your child component using the below code:
js
inject: {
kendoLocalizationService: { default: null },
}
- In your child component, access the
LocalizationService
by using theprovideLocalizationService
function.
Change Theme
Theme
Loading ...
Customizing the Default Service
To override the default behavior of the internationalization service:
- Inherit
IntlService
and override the necessary methods. - Inherit the
IntlProvider
component and override itsgetIntlService
method. - Use the customized
IntlProvider
component.
Change Theme
Theme
Loading ...