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?