Hi Pierre,
I haven’t actually done a ton of translation work in production, but since I’m not seeing any other answers, I thought I’d map out one approach…If you just have a few things to translate, in a few set languages, there are absolutely easier ways to do this, so you’ll have to decide how much translation support you actually want.
The APP text process works well for translation of items not in the db, but for database entries you’ll want to just lookup values for the language desired. As with most things, there are a few ways to tackle this. The solution I propose below is a definitely more complicated to setup, but does a few things I find very important:
-
Allows you to add support for new languages in the future, by simply adding new database entries – you don’t want to maintain anything in your design or workflow tabs with respect to new languages as that would be very time consuming and prone to have omissions.
-
Allows for the users chosen language to be changed at any point without needing to reset any of their data (ie. when they switch language, all the data associated with their account automatically adjusts.)
-
Adds a minimum of complexity to design and workflow code which is where we spend a lot of time developing.
So, first we need a Language thing with some basics like a language code, along with a display value (you will likely add other items, like a flag, etc.) You'll see I also have a yes/no default language that will be used for users having not yet made a selection:
Next, setup a Chosen Language field for each user. You would have a process someplace where the user sets their chosen language from a list that you provide.
But in order to have a default language and also keep the bulk of our searches simple, we’ll set the default language if the Current User doesn’t have one set.
Now, let's setup a data thing to hold our translations (each translation will have a label -- the value we display to users, and it has a language):
And a data thing for food:
What we are doing here, is having a traditional data thing, food (with all the other fields you want to store,) and simply adding a list of translations to each thing we create.
Here is what the actual data might look like to translate “apple”:
Now, if we wanted a repeating group with all the foods, we set that up like so:
We’re really just doing the same type of searches we always do, but we add a filter that gives us our chosen language.
Looking to improve your Bubble™ skills?
Let me turn
into
Coaching and Development at https://uniqueideas.com or schedule a free intro session
Ken Truesdale
LinkedIn