I have a salesforce url coming from sites, when the user executes the URL in browser he can enter first name , last name, select a country from countries picklist, select a state from states picklist and hit the save changes button so when the page loads values are auto populated into the fields and then saved to object fields. I want this to be available in multiple languages, for ex. if a user from japan should see the text(static & dynamic), picklist values and field values only in his native language i.e japanese. I am sorry I have no idea on this else I would have posted a code to work on.
-
1Here's a good post from Keith C. salesforce.stackexchange.com/questions/57288/…– SL manCommented Jul 12, 2017 at 4:17
-
1resources.docs.salesforce.com/198/latest/en-us/sfdc/pdf/…– Adrian Larson ♦Commented Jul 12, 2017 at 4:35
-
@SL, what about the static text, does translation workbench handle that and the button text?– Divya ManoharCommented Jul 12, 2017 at 5:05
Add a comment
|
1 Answer
@Divya
Get the user local language from logged in user [SELECT LanguageLocaleKey FROM User WHERE Id = :UserInfo.getUserId()]
Use Language tag in <apex:page>
(https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_page.htm#d711936e74)
for e.g
<apex:page language="{!userLocal}">
//userLocal is the property whose value you'll get from a query