Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

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.

  • UserLanguage
    • string, e.g. "EN" or "DK"
  • UserLanguageCustomizationVersion   (new)
    • string, e.g. "v1", a date timestamp or something else entirely

The latter is new and must be present for the application to use this feature.

Snippet of GetReferenceData response showing the new element in action:

<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>bm08-09-2017 07:34:19</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.

Request message example:

<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:

<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="bm08-09-2017 07:34:19">
        <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.

  • No labels