If you have more than one language support in your CRM organization, then you may require localizing all error messages that you have set in PBL per the languages installed. The message that you type in the PBL designer is set to be the message shown in the CRM base language. To show the message for an alternate language that is installed in CRM, you need to provide the translation for the same.
Provided below are the steps considering “English” as the base language and “French” as the other language installed.
In order to show error messages as per specific language you need to perform following steps.
First create PBL –
We have created PBL on account entity to show error when Relationship Type is set to customer and Account number field is blank then show error as “Account Number cannot be null or empty.” As shown below and then Activate this PBL.
Now whenever you create PBL and set error message a label is generated by the system.
Export Translation –
Now once you are done with creating PBL then export the Translation as shown below through customizations area.
It will export a zip file. In our case we have translation file named CrmTranslations_Default_1_0.zip
Now you need to unzip this file and open that folder it will contains a file named CrmTranslations.xml as shown below then open that file with Microsoft Excel.
The file contains three worksheets Information, Display Strings, and Localized Labels. We will edit Localized Labels worksheet.
Edit Translations –
The worksheet contains columns for each language code as shown below. Here 1033 code is for English and 1036 is for French.
Now here you need to search for specific error message in “Localized Labels” worksheet which you need to localize. For example in our case it is “Account Number cannot be null or empty.”
Once you search for message it will find in worksheet as shown below.
As you can see in above screenshot there is no error message specified in French language message column.
Now insert the error message in French language column. Note that we need to modify only last column of the worksheet, please do not modify any other data. In this example we have entered error message as “Numéro de compte ne peut pas être null ou vide.” as shown below.
Now save this file and again send it to zip folder. Now import this Translation again to CRM as shown in below screen shot.
Import Translations –
Click on Import Translations -> Choose the ZIP file and click on Import.
Once the translations are imported successfully it will show following message. Once it is done Close the window.
Then Publish All Customizations as shown below.
This way you can show error messages in specific languages for PBL. Here we have enabled only one extra language i.e. French but there are cases where you have multiple languages enabled then you need to check for proper language code and set the specific message in that specific language code column.
Hope this helps!