1

I have a picklist visible to site guest user via a public page. I translated few values into Arabic using translation workbench. The translated values display OK for authenticated users but not for site guest user. For site guest user, I changed the language (from community language picker) to Arabic but I receive English values for the picklist only. Apart from the picklist, the static labels correctly display the Arabic translation. Page displays RTL. Only picklist doesn't display translated values.

Following Apex code is being called from LWC component.

Map<String,String> categoryMap = new Map<String,String>();
    try {
        List<Schema.PicklistEntry> picklistValues = 
        Directory__c.Category__c.getDescribe().getPicklistValues();
        for (Schema.PicklistEntry pe: picklistValues) {
            categoryMap.put(pe.getLabel(),pe.getValue());
            System.debug('*** = '+pe.getValue() + '*** = '+pe.getLabel() + ' **** ' + UserInfo.getLanguage());
        }
        return categoryMap;
    } catch (Exception e) {
        throw new AuraHandledException(e.getMessage());
    }

The debug logs shows user Language as 'ar' (Arabic) but labels are returned in English. anything I'm missing here?

3

1 Answer 1

1

Issue solved. I picked Arabic(UAE) instead of 'Arabic' as language in the community. Removing Arabic(UAE) and adding Arabic solved the issue

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .