Using Option Sets in a Multi-Lingual Context

This is not a new topic, I’ve found several references to challenges around it, but I’d like to raise it in case anyone has found a workaround or perhaps in case there is an update to the multi-lingual capabilities of Bubble we can push for.

We are translating our app (carefinder.nyc) into Spanish and it contains several UI components - multi-selects, repeating groups - that render according to the options in an option set. While we’ve used App Text extensively, there is seemingly no way to have an option set with multi-language support.

The simplest Option Set example I can provide is an option set called “Days of the Week”, which is exactly what it sounds like. We then use that option set to provide parents with a way of indicating when they’ll need childcare:

Here are a few things I’ve tried, which could also be seen as potential future solutions should they be implemented within Bubble:

Adding a custom attribute for each language code and populating the attribute with translated text. With an attribute named by language code Bubble could ostensibly pull that value instead of the display.

Adding a condition to switch to an identical option set with a different language. I copied the option set and renamed it to include the language code in parenthesis “Days of Week (es_ES)” hoping to switch option sets, but Bubble wasn’t game.

Thoughts? Feelings? Opinions? Support.

Thanks in advance,
WiggleRoom

1 Like

I agree, it’s a shame Bubble doesn’t have a built-in solution for this like App Text. I’m facing the same challenge - though in my case I have the luxury of ignoring it for now since for the foreseeable future, English will be the language of my user base. (Having said that, even within English, it’s ‘holidays’ in en_AU, en_NZ, en_GB, but ‘vacations’ in en_US.)

What I think will work for you is to create separate but related presentation and data option sets. Show the former to the user, but store the latter in the database.

In your case…

Use a data option set for Days of the Week as you’ve done. Save that in your Things.

However, create a Days of the Week UI presentation option set too. It needs three attributes:

  1. Display (text - this is a built-in field as you know)
  2. Language (text)
  3. Day of the Week (Days of the Week - i.e. references your data option set).

When you display the day of the week to the user, you show something like…

All Days of the Week UI:filtered:first

… where the filter constraint narrows the choice down to one Days of the Week UI, using the current language and the required Day of the Week like this:

This Days of the Week UI's Language is Current language and 
This Days of the Week UI's Day of the Week is Current cell's DoW

I think you should be able to adapt this scheme to inputs like dropdowns too.

Hope this is useful? I haven’t tried it in anger myself.

Hey, I think you may find this helpful! You shouldn’t have problems to adapt this tips to your case.

This topic was automatically closed after 70 days. New replies are no longer allowed.