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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey!
Is there a way to fetch translations from API? That's would be a nice addition
P.S.
Thanks for nice plugin! Слава Україні!
Beta Was this translation helpful? Give feedback.
All reactions