Syntactic Limits on keys in properties file?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Syntactic Limits on keys in properties file?

Russ @ SmithWorks LLC
I'm working with the combination of Spring 3.1, Thymeleaf, and the Twitter Bootstrap framework. There seems to be a clear constraint on the semantics of key names used, for example, in Messages.properties,  i.e. using an arbitrary key like foo.bar.somegreeting=Hello won't work in conjuction with <div class="someclassname" th:text="#{foo.bar.somegreeting}">Hello</div in the view. By jiggling the key naming around compared to some earlier code, I was able to begin to get the mapping to work, but the syntactical rules as yet escape me. Can someone be very specific on the syntactic naming constraints for these keys to include any limits on "levels" i.e.
th:text="#{level1.level2.level3.level4.level5=}">? Appreciate any clarity as I don't want our team of developers making up magic "rules"
Reply | Threaded
Open this post in threaded view
|

Re: Syntactic Limits on keys in properties file?

Zemi
Administrator
Hello,

the syntax in
  <div class="someclassname" th:text="#{foo.bar.somegreeting}">Hello</div>
is correct.

The problem is probably in another place (not in the i18n key).