public interface Dictionary
Modifier and Type | Method and Description |
---|---|
String |
get(String key)
Gets a message.
|
String |
get(String key,
boolean forceEvaluation)
Gets a message.
|
String |
get(String key,
Locale locale)
Gets a message.
|
String |
get(String key,
Locale locale,
boolean forceEvaluation)
Gets a message.
|
String |
get(String key,
Locale locale,
Map<String,Object> params)
Gets a message.
|
String |
get(String key,
Locale locale,
Pair... params)
Gets a message.
|
String |
get(String key,
Map<String,Object> params)
Gets a message.
|
String |
get(String key,
Pair... params)
Gets a message.
|
String get(String key)
Will use the proper Locale as provided by the
LocaleResolver
.
The behavior if the key is not found can be configured using
SpincastConfig#getDictionaryEntryNotFoundFallbackTo()
and
SpincastConfig.getDictionaryEntryNotFoundBehavior()
.
String get(String key, Locale locale)
Uses the specified Locale.
The behavior if the key is not found can be configured using
SpincastConfig#getDictionaryEntryNotFoundFallbackTo()
and
SpincastConfig.getDictionaryEntryNotFoundBehavior()
.
String get(String key, boolean forceEvaluation)
Will use the proper Locale as provided by the
LocaleResolver
.
forceEvaluation
- if true
,
the TemplatingEngine
will be used even there
are no parameters. This may be useful to trigger some
templating function that don't need parameters. We don't
use the templting engine will default since it is costy.
The behavior if the key is not found can be configured using
SpincastConfig#getDictionaryEntryNotFoundFallbackTo()
and
SpincastConfig.getDictionaryEntryNotFoundBehavior()
.
String get(String key, Locale locale, boolean forceEvaluation)
Uses the specified Locale.
forceEvaluation
- if true
,
the TemplatingEngine
will be used even there
are no parameters. This may be useful to trigger some
templating function that don't need parameters. We don't
use the templting engine will default since it is costy.
The behavior if the key is not found can be configured using
SpincastConfig#getDictionaryEntryNotFoundFallbackTo()
and
SpincastConfig.getDictionaryEntryNotFoundBehavior()
.
String get(String key, Pair... params)
LocaleResolver
.
The behavior if the key is not found can be configured using
SpincastConfig#getDictionaryEntryNotFoundFallbackTo()
and
SpincastConfig.getDictionaryEntryNotFoundBehavior()
.
String get(String key, Locale locale, Pair... params)
Uses the specified Locale.
The behavior if the key is not found can be configured using
SpincastConfig#getDictionaryEntryNotFoundFallbackTo()
and
SpincastConfig.getDictionaryEntryNotFoundBehavior()
.
String get(String key, Map<String,Object> params)
Will use the proper Locale as provided by the
LocaleResolver
.
The behavior if the key is not found can be configured using
SpincastConfig#getDictionaryEntryNotFoundFallbackTo()
and
SpincastConfig.getDictionaryEntryNotFoundBehavior()
.
Copyright © 2019. All rights reserved.