-
public final class I18nLocalizes VoK messages such as exception messages, texts found in the filter components etc. To obtain instance of this class, just use the
vtproperty (provided both for Vaadin 8 and Vaadin 14) which will lookup proper locale from the current UI. See thevtproperty documentation for more details.The standard Java ResourceBundle mechanism is used.
The following resource bundles are searched:
The
VokMessages*.propertiesbundle, located in the root package (src/main/resources/). Create one if you need to customize the localization strings in your app.If the message is not found, the standard message bundle of
com.github.vok.VokMessages*.propertiesis consulted.
Consult the standard message bundle for the list of messages.
Currently there is no support for parameters nor expressions in the messages.
-
-
Method Summary
-
-
Method Detail
-
get
final String get(String key)
Retrieves the message stored under given key. If no such message exists, the function must not fail. Instead, it should provide a key wrapped with indicators that a message is missing, for example
!{key}!.
-
contains
final Boolean contains(String key)
Checks whether there is a message under given key. If not, get will return
!{key}!.
-
-
-
-