-
Hey! P.S. |
Beta Was this translation helpful? Give feedback.
Answered by
Demivan
Jul 29, 2022
Replies: 1 comment 4 replies
-
Hi. It is quite easy to do in userland already. https://fluent-vue.demivan.me/howto/importing-ftl-files.html combine this with fetching. Pseudocode: import { FluentBundle, FluentResource } from '@fluent/bundle'
function changeLocale(locale) {
// Or any other way of fetching messages
const messages = await fetch(`/translations/${locale}.ftl`)
const bundle = new FluentBundle(locale)
bundle.addResource(new FluentResource(messages))
fluent.bundles = [bundle]
} Or you have something else in mind? P.S. |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
Demivan
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi. It is quite easy to do in userland already.
https://fluent-vue.demivan.me/howto/importing-ftl-files.html combine this with fetching.
Pseudocode:
Or you have something else in mind?
P.S.
Thanks for kind words. Героям Слава!