We have a lightning component that displays State & Country Picklists. The component is on a Community builder page with a French language community.
Note: The default language for the organization is English.
The lightning components calls into an Apex controller that executes the following
System.debug(UserInfo.getLanguage()); Schema.SObjectType objType = Schema.getGlobalDescribe().get('Contact'); Schema.DescribeSObjectResult describeResult = objType.getDescribe(); Schema.DescribeFieldResult contrfieldApiNameInfo = describeResult.fields.getMap().get('MailingCountry').getDescribe(); List<Schema.PicklistEntry> controllingValues = contrfieldApiNameInfo.getPicklistValues(); system.debug(controllingValues);
When this code is executed by a french user within a unit test (using runAs) or as anonymous apex (by a french user) the picklist labels returned are French.
However, when executed by the lightning component within the French language community by a French user (confirmed through the UserInfo call), we get only the English labels.
Any thoughts on avenues to explore would be appreciated.