$i18n
on Vue instance.string | undefined
Returns locale code from stored locale cookie.
string
)undefined
Updates stored locale cookie with specified locale code. Consider using setLocale
instead if you want to switch locale.
string
)Promise<void>
Switches locale of the app to specified locale code. If useCookie
option is enabled, locale cookie will be updated with new value. If prefixes are enabled (strategy
other than no_prefix
), will navigate to new locale's route.
string
)Promise<void>
Loads the translation messages of the specified locale code. This is only relevant for projects using lazy-loaded translations when using translations from a non-loaded locale.
string | undefined
Returns browser locale code filtered against the ones defined in options.
Promise<void>
Switches to the pending locale that would have been set on navigate, but was prevented by the option skipSettingLocaleOnNavigate
. See more information in Wait for page transition.
Promise<void>
Returns a promise that will be resolved once the pending locale is set.
Strategies
Routing strategy as specified in options.
Directions
Default direction as specified in options.
string
Default locale as specified in options.
Array<string>
List of locale codes of registered locales.
Array<string | LocaleObject>
List of locales as defined in options.
LocaleObject
Object of the current locale properties.
boolean
Whether differentDomains
option is enabled.