[SOLVED] Multilingual dropdowns

I’ve been knocking my head against my desk for a while about this and can’t seem to find a viable solution.

I need to make a dropdown so the user can choose the status of a thing in the database. The status can either be “None”, “Read” or “Write”. But I want the caption to be something else. Let say: “No access”, “Read only” and “Full access”. This is fine since I can choose which field to display as a caption.

What if I the dropdown to follow the language of the website? Right now I have english/french. Spanish may come in the future. There is no option to dynamically choose the caption field in the dropdown’s property…

Thanks for any help!

I haven’t tried this but you could maybe save the translations in a single string like “en:hello,es:hola,it:ciao” and have a custom state/thing that saves the language in two chars. Then use a regex to extract the translation string by looking for the first match for the two chars for the language.

1 Like

Haven’t thought about this much but can’t you use the conditional tab to provide different lists based on the language.
That is a different condition with a different list for each of your supported languages.

If you were providing static choice options I will have recommended the Air Static dropdowm labels free plugin.

2 Likes

That’s it! It’s exactly the solution I was looking for.

Il will create a data type called “Status Options” with three fields: Status, Caption-EN, Caption-FR. And depending of the selected language the dropdown will display the Caption-EN, or FR.

I couldn’t figure out the conditional part.
Thank you very much!!

Hi @JonL, thanks for replying. What you propose was kind of my last resort solution. I really was looking for a more conventional way to achieve what I needed. Turns out @seanhoots’ solution is exactly what I needed.

Cheers

1 Like

Hello @seanhoots. First of all, thanks for this plugin. It’s great!

Unfortunately, we can’t use the ‘Data source (text lists)’ in a Conditional, so we can’t show different texts from a Data source based on conditions.

Any chance you could update the plugin to enable this?

Thanks!

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