If you are adding message lookups to your package, you need to know about the new instructions that I've drafted (they are in the APM I18N UI as well):
In adp files message lookups are always done with the syntax
<span>#
</span>package_key.message_key#. In Tcl files all message lookups *must* be on either of the following formats:
- Typical static lookup: [_ package_key.message_key] - The message key and package key used here must be string literals, they can't result from variable evaluation.
- Static lookup with non-default locale: [lang::message::lookup $locale package_key.message_key] - The message key and package key used here must be string literals, they can't result from variable evaluation.
- Dynamic lookup: [lang::util::localize $var_with_embedded_message_keys] - In this case the message keys in the variable var_with_embedded_message_keys must appear as string literals on the syntax <span>#</span>package_key.message_key# somewhere in the code. Here is an example of a dynamic lookup:
set message_key_array {
dynamic_key_1 <span>#</span>package_key.message_key1#
dynamic_key_2 <span>#</span>package_key.message_key2#
}
set my_text [lang::util::localize $message_key_array([get_dynamic_key])]
The background for those instructions is that if message keys are created dynamically in any other way than dictated here we will have real difficulties finding the set of message lookups in the system and making sure that we have all those keys in the message catalog files.