| Constructor and Description |
|---|
LangImpl(NinjaProperties ninjaProperties) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearLanguage(Result result)
Clears the current language.
|
String |
get(String key,
String language,
Object... params)
Deprecated.
|
Map<Object,Object> |
getAll(String language)
Deprecated.
|
String |
getLanguage(Context context,
Result result)
Retrieve the current language or null if not set.
|
String |
getWithDefault(String key,
String defaultMessage,
String language,
Object... params)
Deprecated.
|
boolean |
isLanguageDirectlySupportedByThisApplication(String language)
application.conf usually contains the following:
application.languages=en,de
This little helper checks if the language is supported.
|
Result |
setLanguage(String locale,
Result result)
Force a language in Ninja framwork.
|
@Inject public LangImpl(NinjaProperties ninjaProperties)
@Deprecated public String get(String key, String language, Object... params)
Messages.@Deprecated public Map<Object,Object> getAll(String language)
Messages.@Deprecated public String getWithDefault(String key, String defaultMessage, String language, Object... params)
Messages.getWithDefault in interface Langpublic void clearLanguage(Result result)
LangclearLanguage in interface Langpublic Result setLanguage(String locale, Result result)
LangsetLanguage in interface Langlocale - (fr, ja, it ...)public String getLanguage(Context context, Result result)
LanggetLanguage in interface Langpublic boolean isLanguageDirectlySupportedByThisApplication(String language)
LangisLanguageDirectlySupportedByThisApplication in interface Langlanguage - The language to check (en, en-US etc)Copyright © 2013. All Rights Reserved.