Hi, I ran into a problem during the internalization of our app. Basically, it is not natively possible in bubble to add dynamic text to text fields in the database. This is particularly annoying when you want to add multilanguage to your application because of the option sets.
I came up with this solution and I think it might be useful for other people. If you think there is a better solution or have any feedback please let me know in the comments.
First we need to make some changes to the option sets.
-
Create a new option set to store all the translations. We can call it
Translations
for example. -
Add two fields to
Translations
,language_code
andlanguage_text
, both plain text. In my case I am using the display aslanguage_text
and another option calledLanguages
instead of plain text inlanguage_code
.
-
Update the set of options you want to translate by adding a list of
Translations
. In this case, I will translate myRols
option set.
-
Add as many translations as you want. You have to create it in the
Translation
option set, but also add it to the Translation List in the option set you are translating.
Now in the UI, we need to add the list of translations for the option that needs to be displayed and filtered by the current language. Note that in my case users can have multiple roles.
You can change the language of the app in two ways, through the path, adding the ālangā variable or through a field in the database of each user. For me the path has more priority than the field in the db. But you can change the priority order in the filter without problems.
I hope this is helpful to someone!