home
features
quick start
download
documentation
thymol files
configuration
message resources
control parameters
expression objects
thymol types
thymol API
thymol extensions
examples
sessions
say-hello
stsm example
with-dialect
extrathyme
petclinic
news
credits
user forum
issues
browser constraints
other known issues
create new issue
thymeleaf

thymoljs

message resources

properties files

Starting with version 2.0.0 Thymol supports the use of properties files as message resources. The messages are stored as "key=value" pairs and parameter place-holder values ("{N}") may be defined in the usual way.

Thymol attempts to apply the same order of discovery and processing to message resources as Thymeleaf does.

In the first instance, Thymol expects to find messages for a template in .properties files in the same folder and with the same name as the template itself but (potentially) with a suffix derived from the (browser) environment defined locale.

message resolver

If a message resource can't be found in the properties files in the template's directory then Thymol attempts to find this message by searching through properties files in a specified messages directory. These "default" properties files have a base file name "Messages" and (potentially) a file name suffix derived from the (browser) environment defined locale.

This specified default messages directory is defined by a Thymol control parameter named "thMessagePath" (see here).