String localization uses message dictionaries.
Organization of a Message Dictionary
The term message dictionary refers to a global (or part of a global) that stores localizable messages. Each namespace has a message dictionary. The global contains text strings organized by domain name, language name, and message ID.
The text of each message is a string of up to 32K characters. The string may be longer if the database has long strings enabled, but the default maximum is 32K. A message may consist solely of text, or it may also contain one or more parameters specified by %1, %2, etc. You can replace these parameters with text (such as a file name within an error message) when the application page needs to display the message.
A domain name is any arbitrary string. It identifies a group of related text items, such as all messages for a specific application or page. If you assign a domain to a set of messages, you can later perform a particular operation on all messages with the same domain.
A domain name is case-sensitive and may contain upper- and lowercase characters. If a domain name begins with %, InterSystems considers all of the messages in that domain to be system messages that are visible in all namespaces. Otherwise, when you create a message it is visible only in the namespace in which it is defined.
A language name is an all-lowercase language tag that conforms to RFC1766Opens in a new tab. It consists of one or more parts: a primary language tag (such as en or ja) optionally followed by a hyphen (-) and a secondary language tag (en-gb or ja-jp).
A message ID is any arbitrary string; it uniquely identifies a message. The message ID only needs to be unique within a domain. You may assign a message ID or allow the compiler to assign one, depending on the conventions you use to create the message. A message ID is case-sensitive and may contain upper- and lowercase characters.
Message Dictionary Storage
The message dictionary global is called ^IRIS.Msg, and its subscripts are (in order) domain, language, and message ID. The value of each node is the text associated with that domain, language, and message ID.
To view ^IRIS.Msg for a namespace:
Start the Management Portal.
Switch to the namespace of interest.
Click System Explorer > Globals.
In the IRIS.Msg row, click View.
^IRIS.Msg("mydomain","en",3486914925)="another sample string"