Package | Description |
---|---|
org.trimou.handlebars | |
org.trimou.handlebars.i18n |
Modifier and Type | Class and Description |
---|---|
class |
FormatHelper
A simple printf-style format helper.
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractTimeFormatHelper<F,S>
An abstract time formatting helper.
|
class |
DateTimeFormatHelper
This is an alternative to
DateTimeFormatResolver . |
class |
ResourceBundleHelper
First register the helper instance:
MustacheEngineBuilder.newBuilder().registerHelper("msg", new ResourceBundleHelper("messages")).build();
Than use the helper in the template:
{{msg "my.key"}}
The key need not be a string literal:
{{msg foo.key}}
You may also override the default baseName:
{{msg "my.key" baseName="messages"}}
And also use message parameters and Formatter or
MessageFormat :
hello.key=Hello %s! |
class |
TimeFormatHelper
An alternative to
DateTimeFormatHelper which makes use of java.time
package in JDK 8 (JSR-310). |
Copyright © 2017. All rights reserved.