You need to sign in to do that
Don't have an account?
Nikhil Gupta 202
custom label inside a community login page
I have created a custom login visualforce page for my community. I also created couple of custom labels. When I am swtiching the language the translation are not coming up it is showing english only.
I have added the translation.
Any suggestion what I am missing?
Have you added all the desired languages in this click path of your community?
Community Builder -> Settings -> Language -> Go to Site.com to select languages and add all the desired languages > publish the site.
Thanks
Just the Community login visualforce page is having issue.
<apex:page id="loginPage" language = "{!$CurrentPage.parameters.language}">
<html>
<label id="label_user_type">{!$Label.user_type}</label>
<h6>{!$Label.login}</h6>
</html>
</apex:page>
There is no error, English text is coming in all languages .
Not sure if this has been solved, but since you're working with Visualforce, the syntax for referencing custom labels is different:
In Apex use the System.Label.Label_name syntax.
In Visualforce, use the $Label global variable.
In Aura components, use the $Label.c.labelName syntax for the default namespace or $Label.namespace.labelName if your org has a namespace or to access a label in a managed package.
In Lightning web components, import the label using the @salesforce/label/namespace.Label_name syntax.
In Lightning App Builder component labels and attributes, use the {!$Label.customLabelName} expression.
https://help.salesforce.com/s/articleView?id=sf.cl_about.htm&type=5