Tuesday, December 20, 2016

Visualforce - Beyond Basics Series 31 - Use Custom Labels for Global reach

How is the language support from salesforce ?

Salesforce support following three model of language support,

  1.   Platform only support - It translates everything in the platform to your own language.
  2.   Setup Object support - It translates the setup related Object names & labels & instructions to your own language.
  3.   End User support - It translates only the End user view to your their own language.
One's language is determined by the Language setting in 'Language & Time Zone' under your profile


What is Custom Label ?

The translation bench is a place where you give a map of label with different values in different languages. Its nice simple concept. But, it's very powerful. It works well with even managed packages. It gives power to Admin to edit them when they want to.

How it works ?

In visualforce, instead of hard coding labels,  it best advised to get the label value from Custom Labels. So that, it gets translated automatically if its configured in Custom Labels.


Where it will be useful ?

It will be useful in following scenarios

  1.  your Org users are geologically segregated across globe
  2.  when your end user is not proficient with English & want to give their native support.
  3.  when you develop an App for international market
  4.  It's not designed only for supporting languages other than English. Even, you can have a translation for English, by which you give power to Admin to change them later if they wish to. I normally use this in all my projects.


Where is the Code ?

I have illustrated with the example of how to display the label name in native language(Hindi).





No comments:

Post a Comment

Thanks for reading my blog !