M-Tags: Message Catalog Entry
An M-Tag renders text from a Message Catalog entry. A Message Catalog entry is a text string, such as "Thank you for your donation," from a translatable Message Catalog file. Each message in the Message Catalog has an associated "key" value which identifies the text string.
Note: Access to the Luminate Online message catalog is intended for Luminate Online staff administrators and Partners with access to the Message Catalog Editor in Setup > Product Configuration.
M-Tags do not perform translations, but will render text from a Message Catalog entry in the locale specified in the user's session. If the specified locale is not supported, the text defaults to English.
Site Options (Site Data Parameters, or SDP) values can also be rendered with M-tags.
Example:
[[?[[S72:locale]]::en_US::Thanks for your support! You've been registered with our site. Use the link below to update your information.::[[M0:sdp_values:ADVOCACY_AUTOREG_NOLOGIN_PARA_1]]]]
This example first checks whether the user's locale is English (en_US), and if so, it renders the text shown. If the locale is not English, it refers to the Message Catalog.
By using just [[M0:sdp_values:ADVOCACY_AUTOREG_NOLOGIN_PARA_1]] it specifies to use the Message Catalog no matter what. This approach makes management of text easier, since you don't need to check both SDPs and the Message Catalog for text that you want to modify.
Required:
-
M0 - Renders the text retrieved from the Message Catalog in plain text.
Tip: If a format="" attribute is not supplied in the XML syntax, it will default to "none."
-
M1 - Considers the template that gets compiled and then evaluates in the current context. When [[M1 ... ]] ( format="template") is used, the message catalog entry is treated as a template and compiled and evaluated in the current context. A tags referring to the parent template arguments may be used. For efficiency, compilation only occurs once and the compiled Template object is cached site_wide.
Tip: If a format="" attribute is not supplied in the XML syntax, it will default to "none."
-
M2 - When [[M2 ... ]] ( format="template") is used, this allows additional arguments to be passed to the message catalog entries that require one or more additional arguments.
-
bundle - The bundle is the name of the resource bundle and key is the key within that bundle. The resource bundles are found in the msg_cat/ directory within the site_data file system.
Optional:
-
format="java" - This option is used internally by the Java servlets.
-
format="template" - The message catalog entry is treated as a template and compiled and evaluated in the current context
-
format="none" - This option does not evaluate any template.
Example syntax is [[M2:bundle:key:.arg1.arg2.arg3]] where any character that follows "key:" will be used as the delimiter to parse the list of arguments.
If additional [[ ... ]] is needed in the arguments, one way to do it is using the following syntax:
[[R1:[[LL]]M2:bundle:msgKey:.[[A1]].[[A2]].[[A3]][[LR]]]].
Syntax
Bracket Syntax:[[Mn:bundle:key]]
XML Syntax:<convio:msg key="key" cat="catalog_name/bundle" {format="none|template|java"} />