Changing locale

To change locale you need to re-assign bundles property of fluent plugin instance to a new list of bundles. Changing bundles list will automatically re-render all components that use translations.

const enBundle = new FluentBundle('en')
const ukBundle = new FluentBundle('uk')

// Default locale - English
const fluent = createFluentVue({
  bundles: [enBundle]
})

// Change locale to Ukrainian
fluent.bundles = [ukBundle]
1
2
3
4
5
6
7
8
9
10