It is possible to have the Android application download localized labels and messages from the backend, i.e. AX/NAV. It will automatically detect if it necessary to download these labels based on a couple of "configuration" elements part of reference data.
Addition to GetReferenceData response
In order for this mechanism to work, two "configuration" elements must be part of the GetReferenceData response.
...
Code Block | ||
---|---|---|
| ||
<response messageid="{C81C8843-2482-4FBF-BA9E-8EEE041EEE53}" status="Completed" xmlns="http://schemas.microsoft.com/Dynamics/Mobile/2007/04/Documents/Response"> <responseData> <ReferenceData xmlns=""> ... <Configuration> <Key>UserLanguage</Key> <Value>EN-US</Value> </Configuration> <Configuration> <Key>UserLanguageCustomizationVersion</Key> <Value>08-09-2017</Value> </Configuration> ... </ReferenceData> </responseData> </response> |
GetLocalizationData request
If the application does not already have the set of localization data in the specified version, it will request it from the backend via a GetLocalizationData call.
...
Code Block | ||
---|---|---|
| ||
<request name="GetLocalizationData" created="2017-09-08T09:34:22+02:00" xmlns="http://schemas.microsoft.com/Dynamics/Mobile/2007/04/Documents/Request"> <requestData name="GetLocalizationData"> <languageCode>EN-US</languageCode> </requestData> </request> |
GetLocalizationData response
The application will expect a response similar to the example below:
Code Block | ||
---|---|---|
| ||
<response messageid="{276565E5-8912-4192-8092-BC00924A1F0C}" status="Completed" xmlns="http://schemas.microsoft.com/Dynamics/Mobile/2007/04/Documents/Response"> <responseData> <localization> <language code="EN-US" version="08-09-2017"> <string name="MainMenuPutAway">Put away</string> <string name="MainMenuReplenishment">Replenishment</string> <string name="PageReplenishmentOrderListTitle">Replenishment orders</string> <string name="ReleaseOrderMenuItem">Release</string> <string name="PageReplenishmentOrderLinesTitle">Replenishment lines</string> <string name="Item Number:">Varenummer/stregkode</string> </language> </localization> </responseData> </response> |
Data is user profile specific
On the device the localization data is stored as part of the user profile, i.e. it is tied to the 'user and endpoint' combination and thus custom localized labels and messages for one user will not interfere with those for another user. This means full custom translated languages could be transferred using this feature.