The Reusable Dynamics NAV Patterns is a joint initiative between the NAV team NAV partners. This is an open initiative to anyone who has documented design patterns which are specific to NAV, please reach back to us either by leaving a comment here, or by writing to us. This being said, find below the NAV design pattern of the week. (Yes, it’s late in the week, but still!)
Multilanguage Application Data
Meet the Pattern
Generally, NAV translation refers to the translation of UI elements like captions and user texts (messages on dialogs, warnings, error messages). This translation is done by the Microsoft Dynamics NAV team before releasing the localized version of the product.
But there is one more scenario. In this scenario, Cronus International Ltd., wants to sell a “Fiets” to a Dutch customer, a”Cykel” to a Danish one, and a “Bicicletta” to an Italian customer. All 3 are the same inventory item – and its default name is “Bicycle”. But for reporting, Cronus International Ltd. wants to use the customer language preferences for translating the bicycle’s name.
Sometimes there’s a need to support multiple languages for domestic transactions, too. For example, Switzerland has 4 official languages: German, French, Italian and Romansh, the first 3 of them being supported by NAV.
Know the Pattern
The example below uses the Item Translation feature of NAV, however, implementations of the same pattern exist for other application areas.
How to use the pattern
Enter translations for “Bicycle”
In the Windows client, on the bicycle Item card, on the Home ribbon tab, choose Translations.
On the opened page, enter the Danish (language code DAN), the Italian (ITA), and the Dutch (NLD) translations for “Bicycle”.
Set the desired language for the Dutch, Danish, and Italian customers
On the customer card for your 3 customers, in the Foreign Trade FastTab, choose the preferred language for each customer. If no language is specified, then the default item description will be used for items sold or anyhow associated to that customer. If for example, the DAN (Danish) language is specified for the customer, and the “Bicycle” has a translation in Danish, then this translation “Cykel” will be used instead of the default name “Bicycle”.
See the result
After those changes, when the customer (in this case the Danish “Lauritzen Kontormøbler A/S”) transactions a bicycle, the translated description “Cykel” will be displayed on the documents and reports. For example, creating a sales order for this customer with 1 item No. 1000, shows:
Implement the Pattern
Create the translation table
Named “<Entity> Translation” table, where <Entity> is replaced with the name of the actual object being translated. For the Item example above, this table will be named “Item Translation”.
The table definition contains at a minimum:
|Entity ID field||For example, Item No.|
|Language Code||Identifies the language of this translation string (for example, “DAN” (Danish), “BGR”(Bulgarian). This is one of the language codes defined in the Languages table.|
|Translation||The translated string.|
The table above has a key composed of the first two fields.
Create the user interface for entering new translations of <Entity>
- Create a Translations page to present the table created above
- On the Entity card – add a Translations menu option which will open the Translations page
Some of the NAV implementations of this pattern are:
- Item Translation
- Payment Term Translation
- Shipment Method Translation
- Unit of Measure Translation
The Extended Text pattern is a more powerful version of the Multilanguage application data pattern presented in this section. The main differences are:
|Pattern||Multilanguage Application Data||Extended Text|
|Supports translation of application data||Yes||Yes|
|Format||Single- or multi-line||Single-line|
|Applies to document type||Can choose which document types are affected.||All document types are affected.|
The Reusable Dynamics NAV Patterns team