4D v14.3

Using references for menu titles

Home

 
4D v14.3
Using references for menu titles

Using references for menu titles  


 

 

It is possible to enter menu labels and titles as references and not as “hard-coded” text. This will facilitate the translation of applications. You can use three types of references:

  • An XLIFF resource reference of the type :xliff:MyLabel or :15115,3 (compatibility). For more information about XLIFF references, refer to Appendix C: XLIFF architecture.
  • An interprocess variable name followed by a number, for example: :<>vlang,3. Changing the contents of this variable will modify the menu label when it is displayed. In this case, the label will call an XLIFF or STR# resource depending on the translation architecture of the database:
    • XLIFF Architecture: The value contained in the <>vlang variable corresponds to the id attribute of the group element. The second value (3 in this example) designates the id attribute of the trans-unit element.
    • STR# Architecture: The character strings contained in the third line of the STR# resource whose number is found in the <>vlang interprocess variable will be displayed as the menu label.
  • An STR# resource reference. If you enter, for example, :20000,3 the character string contained in the third line of the STR# 2000 resource will be displayed as the menu label. Changing the contents of this STR# resource by programming using the 4D language (see the Resources theme) or a resource editor (under Mac OS) will change the name of the menu the next time it is displayed.

Compatibility note: 4D still supports resources for compatibility reasons only but this mechanism is obsolete and using it is no longer advisable. We recommend that you base your dynamic interfaces on variables or XLIFF architecture.

 
PROPERTIES 

Product: 4D
Theme: Menus and menu bars

 
SEE ALSO 

Using references in static text

 
ARTICLE USAGE

4D Design Reference ( 4D v14 R2)
4D Design Reference ( 4D v12.4)
4D Design Reference ( 4D v13.4)
4D Design Reference ( 4D v14 R3)
4D Design Reference ( 4D v14.3)
4D Design Reference ( 4D v14 R4)