Skip to main content
Version: 1.14.0

setLocale

setLocale(locale): void

setLocale enables the user to set an override for the language that is specified in the browser settings.

Arguments

locale: string

The locale should be specified as a language code and optional country code. This is the same format used by navigator.language

Examples

window.addEventListener('vaReportComponents.loaded', function () {
vaReportComponents.setLocale('fr');
});
window.addEventListener('vaReportComponents.loaded', function () {
vaReportComponents.setLocale('fr-CA');
});