There are a few steps needed to add the translations for another language:
- Create the resx file following the existing naming convention.
- Translate the text to the new language.
- Add a reference to the resx file in the ControlManifest.
Steps to create the resx file:
- Copy the existing translation for English.
- Replace the
1033
in the file name with the number that represents that language.
As an example:- English:
/control/ImageControl/strings/ImageControl.1033.resx
- French:
/control/ImageControl/strings/ImageControl.1036.resx
- English:
Steps needed to translate the text:
- Open the new translation file in a text editor.
- Don't modify anything above the comment:
<!-- Custom -->
- Change the text inside the
<value>...</value>
elements to use the words from the other language.
As an example:- English:
<data name="ImageBorder_Yes_Display_Key" xml:space="preserve"> <value>Yes</value> </data>
- French:
<data name="ImageBorder_Yes_Display_Key" xml:space="preserve"> <value>Oui</value> </data>
- English:
Steps to add the reference to the ControlManifest:
-
Open the ControlManifest.Input.xml file.
-
Below the existing
<resx path="strings/ImageControl.xxx.resx" version="x.y.z" />
elements, add the new translation file.- The number representing the language in D365 needs to go in here.
As an example:Will become the following after adding the French language:<resources> <code path="index.ts" order="1" /> <css path="styles.css" order="1" /> <resx path="strings/ImageControl.1043.resx" version="1.4.0" /> <resx path="strings/ImageControl.1040.resx" version="1.4.0" /> <resx path="strings/ImageControl.1033.resx" version="1.4.0" /> </resources>
<resources> <code path="index.ts" order="1" /> <css path="styles.css" order="1" /> <resx path="strings/ImageControl.1043.resx" version="1.4.0" /> <resx path="strings/ImageControl.1040.resx" version="1.4.0" /> <resx path="strings/ImageControl.1033.resx" version="1.4.0" /> <resx path="strings/ImageControl.1036.resx" version="1.4.0" /> </resources>
- The number representing the language in D365 needs to go in here.
-
When adding the
<resx path="..." version="..." />
element, use the same version number that is already there; this version number will be updated as part of the next release
If you are building the control yourself, the version numbers must be updated before the changes will appear in Dynamics:
- /control/ImageControl/ControlManifest.Input.xml:
<control>
element - /control/ImageControl/ControlManifest.Input.xml:
<resources>
,<resx path="..." version="..." />
elements - /control/package.json: version (Optional)
- /solution/src/other/Solution.xml:
<Version>