I have an option set that is a list of language names “arabic, english, russian etc”
When a user creates a thing, one of the fields they choose in a multi-dropdown is one of those language names.
Where I am stuck is here: after such thing is created, depending on the language chosen, I want to trigger google translate api. I know how to do this, but google translate api only uses language codes (en for english, ar for arabic, ru for russian etc). I need to choose these codes dynamically though depending on the language selected when the thing was created. So essentially my question is, how do I link the language names (option set) with their relevant codes so that I can select the language codes dynamically?
Thanks for the reply. I in fact did this but was unable to retrieve the code. Maybe I am a bit confused.
With the Google translate plugin, when I try to access the language code which I set as an attribute to each language, I am faced with two choices. Either:
“This thing’s language” and as it recognizes it as a field in the thing, it doesn’t seem to give me the option to retrieve the code (attribute) of that specific option.
or
“Get an option” choose “Languages”, “'code”. But this seems to randomly choose a language and I don’t see the option to choose the current thing’s language.
I am not a bubble expert so I am probably missing something obvious.
You are right. I had the language field set as text instead of Languages. I just deleted those and replaced them and now the code attribute shows as you described. Thanks once again.