Internationalization (i18n)
Last updated
Last updated
You can specify locale messages and a default locale for Vueless components. Additionally, you can integrate the package with .
Vueless supports only the English locale by default. To add additional locales, you can provide them in the createVueless()
function under the locale
key, using the structure shown below:
You can easily set custom messages for a specific component by providing the i18n
key in the component’s config.
The full list of locale keys available in Vueless UI can be found in the Default Config chapter of the , at the end of each page.
To integrate the library with Vueless components, use the createVueI18nAdapter()
function. This will allow Vueless components to work seamlessly with the vue-i18n package for localization.
If you’re using , you can change the current locale using the provided useI18n
composable. However, if you want to change the locale without, you can use the useLocale
composable provided by Vueless. This composable allows you to manage the locale directly within the Vueless library.