Logo
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
EPL Standings
 
 
Windows Server

Microsoft Dynamics AX 2009 : The MorphX Tools - Label Editor

7/19/2011 4:05:09 PM
The term label in Dynamics AX simply refers to a localizable text resource. Text resources are used throughout the product as messages to the user, form control labels, column headers, Help text in the status bar, captions on forms, and text on Web forms, to name just a few places. Labels are localizable, meaning that they can be translated into most languages. Because the space requirement for displaying text resources typically depends on the language, you might fear that the actual user interface must be manually localized as well. However, with IntelliMorph technology, the user interface is dynamically rendered and honors any space requirements imposed by localization.

The technology behind the label system is simple. All text resources are kept in a Unicode-based label file that must have a three-letter identifier. The label file is located in the application folder (Program Files\Microsoft Dynamics AX\50\Application\Appl\Standard) and follows this naming convention:

Ax<Label file identifier><Locale>.ALD

The following are two examples, the first showing U.S. English and the second a Danish label file:

Axsysen-us.ALD

Axtstda.ALD

Each text resource in the label file has a 32-bit integer label ID, label text, and an optional label description. The structure of the label file is very simple:

@<Label file identifier><Label ID> <Label text>

[Label description]

Figure 1 shows an example of a label file.

Figure 1. Label file opened in Microsoft Notepad showing a few labels from the en-us label file

This simple structure allows for localization outside Dynamics AX using third-party tools.

After the localized label files are in place, the user can choose a language in the Options dialog box. When the language is changed, the user must close and restart the Dynamics AX client.

You can create new label files by using the Label File Wizard, which you access from the Microsoft Dynamics AX drop-down menu by clicking Tools\Development Tools\Wizards\Label File Wizard. The wizard guides you through the steps for adding a new label file or a new language to an existing label file. After you run the wizard, the label file is ready to use.

Note

You can use any combination of three letters when naming a label file, and you can use any label file from any layer. A common misunderstanding is that the label file identifier must be the same as the layer in which it is used. This misunderstanding is caused by the Microsoft label file identifiers. Dynamics AX ships with a SYS layer and a label file named SYS; service packs contain a SYP layer and a label file named SYP. This naming standard was chosen because it is simple, easy to remember, and easy to understand. Dynamics AX doesn’t impose any limitations on the label file name.


The following are tips for working with label files:

  • When naming a label file, choose a three-letter ID that has a high chance of being unique, such as your company’s initials. Don’t choose the name of the layer, such as VAR or USR. Eventually, you’ll likely merge two separately developed features into the same installation, a task that will be more difficult if the label files collide.

  • Feel free to reference labels in the Microsoft-provided label files, but avoid making changes to labels in these label files, because they are updated with each new version of Dynamics AX.

Creating a New Label

You use the Label Editor to create new labels. You can start it using any of the following procedures:

  • Clicking Tools\Development Tools\Label\Label Editor from the Microsoft Dynamics AX drop-down menu

  • Clicking the Lookup Label/Text button on the X++ code editor toolbar

  • Clicking the Lookup button on text properties in the property sheet

The Label Editor (shown in Figure 2) allows you to find existing labels. Reusing a label is often preferable to creating a new one. You can create a new label by pressing Ctrl+N or by clicking the New button.

Figure 2. Label Editor

In addition to allowing you to find and create new labels, the Label Editor can also show where a label is used. It also logs any changes to each label.

The following are tips to consider when creating and reusing labels:

  • When reusing a label, make sure that the label meaning is what you intend it to be in all languages. Some words are homonyms, meaning words that have many meanings, and they naturally translate into many different words in other languages. For example, the English word can is both a verb and a noun. The description column describes the intended meaning of the label.

  • When creating new labels, make sure to use complete sentences or other stand-alone words or phrases in each label. Don’t construct complete sentences by concatenating labels with one or few words, because the order of words in a sentence differs from one language to another.

Referencing Labels from X++

In the MorphX design environment, labels are referenced in the format @<LabelFileIdentifier> <LabelID>. If you don’t want a label reference to automatically convert to the label text, you can use the literalStr function. When a placeholder is needed to display the value of a variable, you can use the strFmt function and a string containing %n, where n> = 1. Placeholders can also be used within labels. The following code shows a few examples.

// prints: Time transactions
print "@SYS1";

// prints: @SYS1
print literalStr("@SYS1");

// prints: Microsoft Dynamics is a Microsoft brand
print strFmt("%1 is a %2 brand", "Microsoft Dynamics", "Microsoft");


The following are some best practices to consider when referencing labels from X++:

  • You should always create user interface text by using a label. When referencing labels from X++ code, use double quotation marks.

  • You should never create system text such as file names by using a label. When referencing system text from X++ code, use single quotation marks. You can place system text in macros to make it reusable.

Using single and double quotation marks to differentiate between system text and user interface text allows the Best Practices tool to find and report any hard-coded user interface text.

Other -----------------
- Windows Server 2008 R2 : Manage a DNS Server (part 3) - Manage Zone Database Files & Configure Single-Label DNS Resolution
- Windows Server 2008 R2 : Manage a DNS Server (part 2) - Manage DNS Integration with Active Directory & Change Zone Replication
- Windows Server 2008 R2 : Manage a DNS Server (part 1) - Change the Address of a DNS Server & Scavenge Properties for DNS
- Active Directory Domain Services 2008 : Manage Active Directory Domain Services Data - Reset a User Account Password
- Active Directory Domain Services 2008 : Manage Active Directory Domain Services Data - Enable a User Object
- SQL Server 2005 : Privilege and Authorization - Data Organization Using Schemas
- SQL Server 2005 : The Principle of Least Privilege
- Microsoft PowerPoint 2010 : Setting Advanced PowerPoint Options
- Microsoft PowerPoint 2010 : Setting General PowerPoint Options
- Business Server 2011 : Protecting the Power Supply
- Planning Your Small Business Server 2011 Network : Choosing Naming Conventions & Planning for Security
- Microsoft Dynamics GP 2010 : Developing connections with Internet User Defined fields
- Microsoft Dynamics GP 2010 : Getting clarity with User Defined fields
- Performing Daily Exchange Server 2003 Monitoring and Maintenance (part 3) - Configuring Diagnostic Levels and the Monitoring And Status Utility
- Performing Daily Exchange Server 2003 Monitoring and Maintenance (part 2) - Event Viewer & The Monitoring And Status Utility
- Performing Daily Exchange Server 2003 Monitoring and Maintenance (part 1) - Daily Monitoring Tasks
- SharePoint 2010 Search : Search Extensions - Taxonomy, Ontology, and Metadata Management
- SharePoint 2010 Search : Search Extensions - iFilters
- Windows Server 2008 R2 : Add and Remove DNS Servers (part 2) - Add Query Forwarding & Configure a Caching-Only DNS Server
- Windows Server 2008 R2 : Add and Remove DNS Servers (part 1)
 
 
Most view of day
- Windows Server 2012 Administration : Configuring Sites (part 2) - Creating a Site - Adding Domain Controllers to Sites
- Customizing OneNote 2010 : Customizing the Quick Access Toolbar
- Adobe Illustrator CS5 : Understanding Appearances (part 2) - Targeting Attributes, Applying Multiple Attributes
- Windows Phone 7 : 3D Game Development (part 2) - Rendering 3D Primitives
- Microsoft SharePoint 2013 : Working with Visio Services - Designing dashboards - Data linking (part 1) - Obtaining external data
- Microsoft Systems Management Server 2003 : Permissions and Security Objects (part 1)
- Sharepoint 2013 : Health Monitoring and Disaster Recovery - Maintaining Content Integrity (part 2) - Versioning
- Microsoft Excel 2010 : Protecting and Securing a Workbook - Adding Password Protection to a Workbook
- System Center Configuration Manager 2007 : Available Reports and Use Cases (part 3) - Client Status Reporting
- Microsoft Systems Management Server 2003 : Using the Distribute Software To Collection Wizard
Top 10
- Windows Server 2012 : DHCP,IPv6 and IPAM - Exploring DHCP (part 3) - Creating IPv4 DHCP Scopes
- Windows Server 2012 : DHCP,IPv6 and IPAM - Exploring DHCP (part 2) - Installing DHCP Server and Server Tools
- Windows Server 2012 : DHCP,IPv6 and IPAM - Exploring DHCP (part 1)
- Windows Server 2012 : DHCP,IPv6 and IPAM - Understanding the Components of an Enterprise Network
- Microsoft OneNote 2010 : Using the Research and Translate Tools (part 3) - Translating Text with the Mini Translator
- Microsoft OneNote 2010 : Using the Research and Translate Tools (part 2) - Translating a Word or Phrase with the Research Pane
- Microsoft OneNote 2010 : Using the Research and Translate Tools (part 1) - Setting Options for the Research Task Pane, Searching with the Research Task Pane
- Microsoft OneNote 2010 : Doing Research with Linked Notes (part 2) - Ending a Linked Notes Session, Viewing Linked Notes
- Microsoft OneNote 2010 : Doing Research with Linked Notes (part 1) - Beginning a Linked Notes Session
- Microsoft OneNote 2010 : Doing Research with Side Notes (part 3) - Moving Side Notes to Your Existing Notes
 
 
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
2015 Camaro