Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

I have enabled Translations, with languages English and Russian. I have made one Custom Label and added a Russian translation. I have added that Custom Label to my Force.com Site. What do I need to change in Salesforce to view the Russian translation of that Custom Label in my Force.com Site?

I have tried changing the Locale and Language of Force.com Site Site Guest User but it did not work.

Changing my language to Russian and viewing the VisualForce page as /apex/PageName did work - it translated the label into Russian, but that is not what I want. I.e., This is viewing the Visualforce page as ADMIN; I want to know how to achieve the same (view the Russian translation) when viewing the Force.com Site as an unauthenticated user.

share|improve this question
    
I don't really understand what do you want. If you can see the translation on the page - what else? –  mast0r Dec 11 '12 at 12:38
    
@mast0r, I can see the translation when I view the Visualforce page as an Admin. I want to know how to achieve the same when viewing the Force.com Site as an unauthenticated user. –  Suman Krishna Saha Dec 11 '12 at 12:44
add comment

2 Answers

up vote 9 down vote accepted
<apex:page sidebar="true" showHeader="false" language="ru">

The language parameter of the page decides language.

Make a getter setter variable in the controller and use userinfo to get the language or through the query and populate on the language parameter.

http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_page.htm

This method works but still need to investigate more on why for unauthenticated user it's weird! Please try in different browser where only unauthenticated user is accessing page.

share|improve this answer
add comment

Make sure the custom labels you have translated are in vf tags <apex:outputText /> and not just stand alone text like <p>{!$Label.MyLabel}</p>

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.