Closed galdazbiz closed 3 years ago
Yeap it would be nice, but the forum works on a different way now. It is an REST API + Vuejs on the frontend. So we will need to find a way of loading all the translations when the app loads at first and then use them on the Vuejs templates. How does that sound?
Why not using https://kazupon.github.io/vue-i18n/ for the frontend? Or similar implementation.
I can make the integration if it's good for you! Vue-i18n or custom integration.
I think is a great idea! π
@Brouilles Hi, translations sounds great, but are you working/will be working on that or you have abandoned this idea?
Hi. Sorry but I not working anymore on this. I have developping m'y own forums system with Livewire.
@Brouilles ok, thanks for answer ;)
@Brouilles can you help me a little bit? I'm a pure backend developer and I found adding i18n for vue a little bit difficult for me. In examples I see code like that:
const messages = {
en: {
message: {
hello: 'hello world'
}
},
ja: {
message: {
hello: 'γγγ«γ‘γ―γδΈη'
}
}
}
// Create VueI18n instance with options
const i18n = new VueI18n({
locale: 'ja', // set locale
messages, // set locale messages
})
// Create a Vue instance with `i18n` option
new Vue({ i18n }).$mount('#app')
I understand that locale and message will be passed to the Vue from the php backend but I dont know where they should be passed, into which file, I don't know where vue is instantiated and don't know how to pass those variables to make them work both in my own components and also for this package (after replacing hardcoded values inside this package).
Can you explain it to me?
@Brouilles @galdazbiz if you are still interested then you can look at this https://github.com/Chatter-Laravel/core/pull/39
Fixed in #39, thanks to @Lukasz93P
We are using the "old" forum for some time, implementing new things etc and now we've found this one. In the old one there was translations already (I pull requested it) I'm not a coder but somehow I managed to do it. Not sure if you could use that part of the code to replicate it here and I offer to maintain it from time to time as I did with the other.