3

Is there any standard functionality in apex that gives me the ISO code of a string(english - en). I am looking for better approach to handle this.

One of the idea was to store languages and iso codes in custom settings and get it from there, but if there are any other better ways that i should try?

2

As far as I know, this mapping is not standard. Custom Settings are indeed the most efficient way to go. You want a List Custom Setting where the Name corresponds to the language name. Add a custom field called ISO Code and populate it with the values you want.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.