...
Individual pages and components can override the values defined in the message catalog. {float:right|width=45%}
{note:title=Avoid BOMs}
Make sure that your properties files don't contain [byte order marks (BOM)|http://en.wikipedia.org/wiki/Byte_order_mark], because Java -- and thus Tapestry -- doesn't support BOM in properties files (see Wiki Markup
Warning | ||
---|---|---|
| ||
Make sure that your properties files don't contain byte order marks (BOM), because Java – and thus Tapestry – doesn't support BOM in properties files (see http://bugs.sun.com/view_bug.do?bug_id=4508058). |
...
Some |
...
editors |
...
write |
...
them |
...
out |
...
when |
...
saving |
...
a |
...
file |
...
in |
...
UTF-8, |
...
so |
...
watch |
...
out. |
{note} {float}
Properties File Charset
Tapestry uses the UTF-8
character set (charset) when reading the properties files in a message catalog. This means that you don't have to use the Java native2ascii
tool.
...
Messages can be accessed in one of two ways:
- Using the "message:" binding expression in a component template
- By injecting the component's Messages object
In the first case, you may use the message: binding prefix with component parameters, or with template expansions:
...
As usual, "prop:" is the default binding prefix, thus user.name
is a property path, not a message key.
...
If you change a property file in a message catalog, you'll see the change immediately, just as with component classes and component templates (provided you're not running in production mode).
Asset Localization
When injecting assets, the injected asset will be localized as well. A search for the closest match for the active locale is made, and the final Asset will reflect that.
...
Tapestry "narrows" the raw request locale, as specified in the request, to a known quantity. It uses the configuration symbol tapestry.supported-locales
to choose the effective locale for each request. This value is a comma-separated list of locale names. Tapestry searches the list for the best match for the request locale; for example, a request locale of "fr_FR" would match "fr" but not "de". If no match is found, then the first locale name in the list is used as the effective locale (that is, the first locale is used as the default for non-matching requests). Thus a site that primarily caters to French speakers would want to list "fr" as the first locale in the list.
...
Info |
---|
Please note that a patch is always preferred over an archive of properties files. |
Scrollbar |
---|