Hi everyone,
I am putting together a local community application and I would like to have a toggle on the app to switch between 2 languages - Thai and English. What would be the best way to do this?
Thank you in advance!
Hi everyone,
I am putting together a local community application and I would like to have a toggle on the app to switch between 2 languages - Thai and English. What would be the best way to do this?
Thank you in advance!
Glide does not yet have a multilingual feature built in, but you could build it yourself:
2 would be the simplest to setup, maintain and would probably give you better loading performance.
I had never thought of it and like approach 4 a lot.
Darren, would the setup you have in mind be as follows:
Approach 2 feels easier to maintain, though each change in the Layout Editor needs to be performed as many times as available languages. Approach 4 is more elegant and maybe better for performance?
I think I read somewhere that the easiest way to do it is using Weglot! You should be able to install Weglot and everything will be translated automatically! I am going to test it myself today as a I need an application in both German and English!
I’d be curious to know if Weglot will translate everything in the app. And how would the language picker be implemented?
Whatever you manage to do, if you have the time please share here
Testing it out right now. I read it on the forum some months ago.
Here’s the link: Machine Translations with WeGlot
Here’s a youtube video explaining it: https://www.youtube.com/watch?v=Y_5MbmQMhFE
The language picker is not supported so you access the translated version through another URL. (of course you can add a button to your app which leads to the right language version)
Testing it out right now
Not exactly.
I’ve been using variations of this approach for about 3 years now, and the approach has evolved and been refined with each new App that I’ve implemented it in. The current approach works as follows:
{
"translations": {
"zh": "输入总工作时间",
"ms": "Masukkan Jumlah Jam bekerja",
"ta": "வேலை செய்த மொத்த நேரத்தை உள்ளிடவும்"
}
}
N
from start from the Strings table, beginning at zero.So a typical component configuration might look something like:
In the above example, each of the Field Component Labels (and the Title) takes a value from User Profile → s/number
The most tedious part is creating all the Single Value columns in the User Profile (I have one App that has almost 300 of them), but the naming convention that I use makes it pretty easy to quickly duplicate/edit/save. And once it’s done, it’s very easy to manage.
You might ask the question - why not use an integration to dynamically translate on the fly? I have done this in one App, using Google Translate, and the cost skyrocketed. And because this is all static text that never changes, dynamic translation is really overkill.
Thank you, Nathanael, I appreciate your response. I will explore these options
Thanks Nathan, I will take a look
Thank you Darren, much appreciated
Can you share the JS code you used? If you can share, thank you very much.
To extract the required language string?
It’s quite simple:
const json = JSON.parse(p1);
return json.translations[p2];
p1 is the JSON string
p2 is the Users preferred language
Note that JavaScript isn’t actually required. The same thing could be done with the new Query JSON column.
Would be cool if you could make a simple public template with how you use translation?
I made a little video & explanation because I have seen this question a lot before and because it was so easy to do with my app (just did it in 5 minutes) I think this might be one of the best ways to translate apps!
Yeah, that’s occurred to me. Something for a rainy day
Holy shit Darren, this is an awesome solution!
Hey, @Darren_Murphy
It’s been a year since you posted this awesome tip on multilingual app. Has it changed since then?
Building my own app now and trying to find solution to not add hundreds of columns, but seems like it is still impossible to do localization without them
I still do it the same way that I described above.
Have you explored the option that @Flowcode posted?
Great, thank you!
I thought about weglot and also translating with Glide AI on the fly, but I have only 3 languages and there is no need to make an automated translation, actually. Just wanted to have the most optimized solution for manual translation)