I want to display the field validation error massage in other language (let say Spanish) on VF page without using java sript but with any availalbe SFDC inbuilt functionality?
Let Say First name is a requied field on my VF page, I want to display the validation "Enter field Value" in Spanish without using jQuery, Javascript.
Any options?
Attribution to: Roshan
Possible Suggestion/Solution #1
Is the first name a required field just in your VF page or is there a validation rule requiring the field?
If you're using a validation rule & translation workbench (to translate the error message) you could use which will display the Validation error message. Of course this means the user has to attempt to save the record to trigger the validation message itself.
You can also add your own custom error messages in your controller/extension using .addmessages ... example: ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.error,Label.Your_Error_Message_Label));
There's a post on the dev forums recommending using a custom label in your apexpages.messages for translation: http://boards.developerforce.com/t5/Visualforce-Development/Displaying-multilingual-error-message-in-visualforce/m-p/452239#M51505
Attribution to: Salesforce Wizard
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/706