Friday, July 28, 2017

Language Translation in VisualForce Page

Salesforce provide functionality through which you can create single VF page and that can be translated in different languages based on language or locale preference of current logged in user.

You need to upload the translation of all custom fields which you are going to use in VF page and can utilize custom labels to display warning, error information on VF page.

In order to render the VF page in particular language, use Language attribute on <apex:page> tag. You can also bind this values with controller variable so that you can render VF page in different language.

<apex:page controller="SK_LocalizationTestController" language="{!selectedLang}">

I have created a very simple VF page to illustrate this functionality by displaying account information. I have dropdown on VF page through which user will select language and VF page will re render to display page in selected language.





Note:
  • If you are displaying page message using <apex:pageMessages>, then use custom label on apex class to display message. Upload all translation for custom label in salesforce.
  • For custom fields also you need to upload language translation. Please refer Translation Workbench under Set Up.
  • The language attribute does accept ISO country codes plus an optional locale like en,en_US,de,de_DE etc.
  • For displaying header or pageblock section title, use custom labels.

More Blogs>>: 
USING DATABASE.UPSERT WITH EXTERNAL ID   
DYNAMIC APEX IN SALESFORCE   
SOQL INJECTION IN SOQL   
CUSTOM METADATA AND CUSTOM SETTINGS IMPLEMENTATION TRICKS   
SMART TABLE USING ANGULARJS IN VISUALFORCE PAGE   
REST API TUTORIAL FOR SALESFORCE   
VISUALFORCE COMPONENT FOR RECORD STATUS BAR   
DYNAMICALLY CREATING AND DESTROYING LIGHTNING COMPONENTS    
RAISING AND HANDLING CUSTOM EVENTS IN sALESFORCE lIGHTNING    
WHY TO USE DESIGN RESOURCE AND HOW TO ADD DYNAMIC OPTION TO DATASOURCE    
PASSING INNER WRAPPER CLASS TO LIGHTNING COMPONENT    
LIGHTNING COMPONENT FOR RECORDTYPE SELECTION FOR ANY SOBJECT    
FETCHING FILE FROM EXTERNAL/PUBLIC URL AND STORING IT IN SALESFORCE   

23 comments:

  1. Croma campus do guide our participants for respective Certifications for Salesforce Training in Noida which is an added advantage to the current market.

    ReplyDelete
  2. This paragraph gives clear idea for the new viewers of blogging, Thanks you.
    Salesforce Training in Noida

    ReplyDelete
  3. I just see the post i am so happy the post of information's.So I have really enjoyed and reading your blogs for these posts.Any way I’ll be subscribing to your feed and I hope you post again soon.

    best selenium training institute in hyderabad
    best selenium online training institute in hyderabad
    best institute for selenium training in hyderabad
    best software testing training institute in hyderabad

    ReplyDelete
  4. I liked the content on this site. Would like to visit again.
    Brazilian Portuguese Translation

    ReplyDelete
  5. If more people that write articles involved themselves with writing great content like you, more readers would be interested in their writings. I have learned too many things from your article. Website translation into another language service

    ReplyDelete
  6. Wonderful information, Very impressive and interesting blog. oracle training in chennai

    ReplyDelete
  7. Unless you have the resources to employ full time multilingual copywriters, Top free Elvish translators chances are that you'll be appealing to the services of a professional translator.

    ReplyDelete
  8. I went over this site and I trust you have a ton of awesome data, spared to my bookmarks language learning

    ReplyDelete
  9. Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.
    Data science training
    Bigdata Hadoop training

    Data Analytics Training
    Devops training
    Selenium training

    ReplyDelete
  10. You’ve got some interesting points in this article. I would have never considered any of these if I didn’t come across this. Thanks!. Certified Translation

    ReplyDelete
  11. If you set out to make me think today; mission accomplished! I really like your writing style and how you express your ideas. Thank you. learn chinese pdf

    ReplyDelete
  12. Thank you for taking the time and sharing this information with us. It was indeed very helpful and insightful while being straight forward and to the point.


    Docker Kubernetes training in Gurgaon
    AWS cloud training in Gurgaon
    FullStack Development Training in Gurgaon

    ReplyDelete
  13. This particular is usually apparently essential and moreover outstanding truth along with for sure fair-minded and moreover admittedly useful My business is looking to find in advance designed for this specific useful stuffs… traduccion jurada Madrid

    ReplyDelete
  14. AlmaMate offers the best Salesforce training in Noida. It is actually regarded as one of the best training institutes in Noida for Salesforce. We offer best-in-class SFDC development training not only in Noida but in pan India location. The Salesforce training provided by us is devised to make you ready to deploy.

    Our Salesforce training is aligned with the industry standards and it has been designed in keeping in view all the necessary inclusions. AlmaMate ensures 100% placement assistance after successful completion of your training. If you are looking forward to making your career in the Information Technology domain then join the best Salesforce training in Noida.To get further details of our services simply decision India at: (Toll Free) US: +91 9315269123
    Best Salesforce Training in Noida
    Best Salesforce Training in Delhi
    Salesforce Training in Noida

    ReplyDelete
  15. Good Post! it was so good to read and useful to improve my knowledge as an updated one, keep blogging

    ReplyDelete
  16. Good Post! it was so good to read and useful to improve my knowledge as an updated one, keep blogging

    ReplyDelete
  17. Want to do Data Science Training in Chennai with Certification Exam? Catch the best features of Data Science training courses with Infycle Technologies, the best Data Science Training & Placement institutes in and around Chennai. Infycle offers the best hands-on training to the students with the revised curriculum to enhance their knowledge. In addition to the Certification & Training, Infycle offers placement classes for personality tests, interview preparation, and mock interviews for clearing the interviews with the best records. To have all it in your hands, dial 7504633633 for a free demo from the experts.No.1 Data Science Training in Chennai | Infycle Technologies

    ReplyDelete
  18. This comment has been removed by the author.

    ReplyDelete
  19. Excellent information, many thanks for providing this kind of data. The most fascinating and best information is provided on your website. Regards!
    Web desgin course institute in hyderabad

    ReplyDelete
  20. Digital Edge stands out as the best SEO services company in Noida, combining expertise with innovation. Their commitment to driving online success is commendable, making them a trusted partner for businesses seeking top-notch digital marketing solutions.
    Best SEO Services Company in Noida

    ReplyDelete