Today's post is written by Mike Dearing, Development Principal at Sonoma Partners.

Alright, so you’ve finished customizing your organization and applying your company’s color palette to every nook and cranny of the application, but one task still remains – supporting your multi-lingual user base. While it may sound overwhelming, translating literally every string in your organization, keep in mind that you’re only responsible for any of the labels you and your team have put in place – Dynamics will handle everything that is native.

Below, I’ve broken down the types of translations that should be considered for your organization into 5 general categories.  But first, a few pre-requisites:

  • Ensure that you have the CRM System Administrator security role.
  • Change your language to the organization’s base language within your user settings.
    1

  • Install Excel or an Excel equivalent.

Native User Interface

This includes out of the box components such as native entity names, native field labels, native ribbon buttons, native sitemap tiles, etc.  Dynamics provides translations for their native UI which can be enabled through system settings.  While the base language of your organization is already enabled, if an additional language is desired it must first be provisioned for usage.  For Dynamics Online customers, this process is simplified, as all available language packs are pre-installed on your server.  For Dynamics On-Premise customers, you’ll need to download the language pack(s) that you’d like to provision from the Microsoft Download Center before completing the following steps.

  1. Navigate to Settings -> Administration -> Languages.
  2. Place a checkmark next to any additional languages to be provisioned (ex: Spanish).  Take note of the ‘Language Code’ column, as we’ll be using that throughout the other translation steps.
  3. Press ‘Apply’.
    2

  4. Read and accept the confirmation dialog.
    3

  5. The language will start provisioning.
    4

  6. You may close the dialog once the provisioning has completed.  Users may now select the language from their user settings.

Custom Entities & Fields

Native entities and fields will have been translated through provisioning of the corresponding language packs.  However, custom entities, custom fields, and any relabeling done for native fields will need to have translations applied.

  1. Navigate to Settings -> Solutions.
  2. On the solutions grid, if you haven’t done so already, go ahead and create a solution containing any custom entities and native entities that you’ve customized.  This will make our translation process quicker than trying to export translations from the default solution.
  3. From the solution grid, select your solution and then press ‘Export Translations’.
    5

  4. A dialog stating that this process may take several minutes will appear.  Press OK.
  5. A zip file called ‘CrmTranslations_<SolutionName>.zip’ will be downloaded.
  6. Extract the zip file.  You will be editing the file named CrmTranslations.xml.
  7. Open CrmTranslations.xml in Excel.  This workbook has 3 tabs: Information, Display Strings, and LocalizedLabels.  LocalizedLabels will be the tab where you’ll be doing your translations.  There will be a column per language pack provisioned.
    6

  8. You can ignore translating rows with an EntityName of Solution or Publisher.  You should also ignore translating rows with an Entityname of RibbonCustomization, as this will not be applied properly.  To translate ribbon buttons, see the “Custom Ribbon Buttons” step later.
  9. Once completed, save the translation file.
  10. If the file was extracted from the downloaded zip file, make sure to place the updated file back into the zip.
  11. Navigate to Settings -> Solutions.
  12. On the solutions grid, select your solution and then press ‘Import Translations’.
    7

  13. From the ‘Import Translated Text’ dialog, select the translation zip file, including your updated xml, and then press ‘Import’.
    8

  14. Once the process is completed, you may close the dialog.
  15. Publish all customizations.


Custom Sitemap Tiles

Only custom tiles with custom titles need translations.  Note that most tiles, even ones pointing to custom entities, will automatically translate based on other translations added to the environment in a prior step (see: “Custom Entities & Fields”).

  1. Navigate to Settings -> Solutions.
  2. Create an Unmanaged Solution with ONLY the Site Map in it.
  3. You can add the site map to this solution by clicking ‘Client Extensions’ from the left navigation and select Add Existing, Site Map.
    10

  4. Export the solution.
    9

  5. Within the solution zip, open the Customizations XML.
  6. Note the languages node at the bottom of the file.  It should include all of the provisioned languages within your organization.
    12

  7. For any custom title nodes, ensure there is a title node per locale id specified within the languages node.
  8. Save the XML file when finished.
  9. If the file was extracted from the downloaded zip file, make sure to place the updated file back into the zip.
  10. Navigate to Settings -> Solutions and import the solution zip back into CRM.
    13

  11. Publish all of the customizations.
    14

Custom Ribbon Buttons

Only custom ribbon buttons added to a ribbon need translations.  This includes the application ribbon as well, in case you’ve customized that.  Native ribbon buttons will translate through the provisioning of the associated language pack.

  1. Create an Unmanaged Solution containing all of the entities with custom ribbon buttons.  Note that if you have edited the application ribbon, you’ll want to add that by clicking ‘Client Extensions’ from the left navigation and select Add Existing, Application Ribbon.  In the example below I’ve included the native Quote entity. 
  2. Export the solution.
    15

  3. Within the solution zip, open the Customizations XML.
  4. Search for “<LocLabels>”.
  5. Each <LocLabel> node within the XML should have a <Titles> node nested within.  Inside of each <Titles> node is a <Title> node that specifies a string, as well as a language code.  Ensure that a title node exists per provisioned language.
    16

  6. Save the XML file when finished.
  7. If the file was extracted from the downloaded zip file, make sure to place the updated file back into the zip.
  8. Navigate to Settings -> Solutions and import the solution zip back into CRM.
    17

  9.  Publish all customizations.
    18

Custom Code

Custom HTML pages, javascript messages, and certain plugin messages should be translated as well.  There are various options here, but the two most common ones are:

  • Create a custom ‘Translation’ entity and add records within that entity to store a translation value, a translation key, and a locale id per language pack, per message to translate.
  • Create an xml web resource to store a translation value, a translation key, and a locale id per language pack, per message to translate.

Whichever path you choose, you can then retrieve those translations from your custom code as necessary based on the current user’s locale. Server-side, consider querying the usersettings entity for the uilanguageid and localeid. Client-side, consider leveraging the Xrm library’s Xrm.Page.context.getUserLcid().

And that’s it. While we may not excel in providing the translations themselves - though we do like to dabble in upside down question marks while buffing up on our ascii face art like so: (*¿*) - we do excel in helping you get your environment ready for them, so let us know how we can help!