With the introduction of Multi-language User Interface or MUI packs in Microsoft Dynamics CRM 4.0, customizers now have the added benefit of being able to select what display language should be used. A given organization may have English, Japanese, and French installed, and each user expects all pages, customized or not, to be displayed in their language of choice. CRM 4.0 makes it easy for customizers to identify the current language in use and respond appropriately.
IFrames on Entity Forms
When adding an IFrame to an entity, it’s simple to pass along language information to the page being displayed.
1. In the form editor, click the IFrame which needs language information and then click “Change Properties”.
2. In the properties dialog, click the check box next to “Pass record object-type code and unique identifier as parameters” and click OK.
3. Save and publish the entity form as normal.
Now the user and organization language codes will be sent to the IFrame via the query-string parameters userlcid and orglcid. Additionally, the parameters orgname, type, typename, and id will be added to the querystring; they represent the organization’s unique name, the type code of the entity, the type name of the entity, and the unique identifier of the entity, respectively.
Toolbar Buttons and Menu Items
Toolbar buttons and menu items can also open pages which may need language information. These properties are modified through the ISV.config file.
The following XML nodes in ISV.config can have language information added:
Each of these nodes can take a Url attribute, specifying a page to be opened when the button is clicked. Passing language information is as simple as adding the attribute PassParams="1" to the node. For example:
<MenuItem Url="http://www.microsoft.com" PassParams="1">
Make this change to the ISV.config file, then import and publish the changes. Now the opened page will have the querystring parameters userlcid and orglcid as above. That’s all there is to it!