I am trying to populate a picklist with my salesforce orgs displayed languages (viewable through setup > Company Settings> Language Settings).
There is a way to access all available languages (specifically User LanguageLocaleKeys):
Schema.DescribeFieldResult fieldResult = User.LanguageLocaleKey.getDescribe(); List<Schema.PicklistEntry> picklistValues = fieldResult.getPicklistValues();
However I don't want to display all LanguageLocaleKeys as my org only supports the languages we have set as displayed languages. Additionally, when some users register with the picklist with all available languages and pick a language that is not in the "displayed languages lists", their language locale key shows as a number in their User detail page in salesforce instead of their language (for example nl_BE shows as 22).
Is there any way to filter this list? Or only retrieve the displayed languages?