Custom Labels translations not working on lightning component in communities
Last updated 2018-10-31 ·Reference W-3593564 ·Reported By 40 users
No Fix
Summary
When "Lightning Communities Page"(Lightning Component) was placed in the community,
Custom Labels translations not working. It is always an English resource.
Repro
1. create new org and enable mydomain.
2. create test community using Napili template
3. enable "French" language (Setup-> Translation Workbench-> Translation Settings-> Click [Add])
4. create Custom Label (Setup-> Create-> Custom Labels-> [New Custom Label])
ShortDescription: selected_language
Language: English
Value: English
5. create "French" Translation on selected_language Custom Label(Click [New] button)
Language: French
Translation Text: French2
6. create "English" Translation on selected_language Custom Label(Click [New] button)
Language: English
Translation Text: English2
7. launch "Developer Console"
8. create LightningComponent on DeveloperConsole(File->New->LightningComponent)
9. check "Lightning Communities Page" and [Submit]
<aura:component implements="forceCommunity:availableForAllPageTypes" access="global">
<h3>Select Language: </h3> <h2>{!$Label.c.selected_language} and {!$Locale.langLocale}</h2>
</aura:component>
10. launch "Community Builder" (Setup-> Customize-> Communities-> All Communities-> Click [Builder])
11. click "Page Editor" on Community Builder
12. Drop "test_compornent" in page area
13. Click [Publish]
14. Change test user's language and locale to French
15. access test community
16. you can see "English2" instead of "French2"
Workaround
Use Visualforce instead of LightningComponent
This is determined to be Working as designed as the community needs to support the language as well.
Please go to the following path and enable the language that you would like to display the labels in :
Community Builder -> Settings -> Language -> Go to Site.com to select languages and add all the desired languages followed by publishing the site.
- If the above doesn't solve your issue, please log a case with support.
Reported By (40)















Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.