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 i18n
key, using the structure shown below.
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 package for localization.
You can easily set custom messages for a specific component by providing the i18n
key in the component’s config.
Vueless provides minimal built-in support for internationalization (i18n) out of the box. However, we strongly recommend using alongside vueless-i18n
to take full advantage of advanced i18n features.
The built-in internationalization support in Vueless works fine with Nuxt. However, you will need to use the for more advanced features like route localization. Run to install Nuxt i18n:
You can extend and overwrite in locales directory.
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.