Dynamics CRM, Translations

Translations in Dynamics CRM – Part III

Manage field translations programmatically is also possible and therefore useful as you might import your products from another system and therefore also want to import the translations via the import.

Therefore, load the item, where you want to update or add your translation. Then you have to check, if the translation for your language already exists. If the translation exists, you only have to update the translation, if it has changed. If the translation doesn’t exists, you have to add the translation as a new Localized Label.

Keep in mind, that if you want to create a new product, the connected user has to set the language to the base language (usually English). Otherwise, you will get the following error message:

System.ServiceModel.FaultException`1: ‘Rows with localizable attributes can only be created when the user interface (UI) language for the current user is set to the organization’s base language.’

With the following SourceCode, you can create a new product and add translations to the product.

 

Changing the language will also use the translation for the name.

Product - Translated in English

Product - Translated in GermanProduct - Translated in Italian

 

 

 

This translation will also be displayed, if the product is used as a lookup in another form.

 

Translations in Dynamics CRM – Part I

Translations in Dynamics CRM – Part II