0

I have created custom labels for the prechat page for live agent chat in Salesforce and maintained the translations. What parameter can I use on the VF page to drive the correct language translation based on the chat button configuration ?

1

You need to add the "language" parameter to your page tag.

<apex:page language="xx">

You could populate the value of the 'xx' with something you query from the user, or a URL parameter from the site, or something else.

| improve this answer | |
0

I was able to this by accessing the language corresponding to the chat button via the url that SF builds.

var languageMatcher = new RegExp("language=(.{2})");
var language = languageMatcher.exec( decodeURIComponent( document.location ) )[1];
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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