Class LanguageConstantsCallable
- All Implemented Interfaces:
de.uplanet.lucy.server.scripting.velocity.ICallableWithVelocityContext
-
Constructor Summary
ConstructorDescriptionLanguageConstantsCallable
(de.uplanet.lucy.server.i18n.ILanguageConstantsProvider p_provider, org.apache.velocity.context.Context p_vc, String p_strLang, String p_strDefaultLang) -
Method Summary
Modifier and TypeMethodDescriptioncloneWithNewContext
(org.apache.velocity.context.Context p_velocityContext) Create a copy of the callable with a new Velocity context.Get a localized string in the context language given its key.Get a localized string in the context language given its key.Get a localized string in the context language given its key.Get a localized string in the context language given its key.getByAppByLang
(String p_strAppGuid, String p_strLang, String p_strKey) Get a localized string in the given language for the given key.getByAppByLang
(String p_strAppGuid, String p_strLang, String p_strKey, String p_strFallbackValue) Get a localized string in the given language for the given key.Get a localized string in the given language for the given key.Get a localized string in the given language for the given key.
-
Constructor Details
-
LanguageConstantsCallable
-
-
Method Details
-
cloneWithNewContext
public LanguageConstantsCallable cloneWithNewContext(org.apache.velocity.context.Context p_velocityContext) Create a copy of the callable with a new Velocity context.- Specified by:
cloneWithNewContext
in interfacede.uplanet.lucy.server.scripting.velocity.ICallableWithVelocityContext
- Parameters:
p_velocityContext
- The new Velocity context.
-
get
Get a localized string in the context language given its key.If there is no value for the given key in the context language, the default language of the portal is used as a fallback. If no fallback is available
null
will be returned.- Parameters:
p_strKey
- The key.- Returns:
- The localized string.
-
get
Get a localized string in the context language given its key.If there is no value for the given key in the context language, the default language of the portal is used as a fallback. If no fallback is available then the given fallback will be returned.
- Parameters:
p_strKey
- The key.p_strFallbackValue
- A fallback value that is returned if no value could be found for the given key.- Returns:
- The localized string.
-
getByLang
Get a localized string in the given language for the given key.If there is no value for the given key in the given language, the default language of the portal is used as a fallback. If no fallback is available
null
will be returned.- Parameters:
p_strLang
- The language.p_strKey
- The key.- Returns:
- The localized string.
-
getByLang
Get a localized string in the given language for the given key.If there is no value for the given key in the given language, the default language of the portal is used as a fallback. If no fallback is available then the given fallback will be returned.
- Parameters:
p_strLang
- The language.p_strKey
- The key.p_strFallbackValue
- A fallback value that is returned if no value could be found for the given key.- Returns:
- The localized string.
-
getByApp
Get a localized string in the context language given its key.If there is no value for the given key in the context language, the default language of the portal is used as a fallback. If no fallback is available
null
will be returned.- Parameters:
p_strAppGuid
- The GUID of the application the key belongs to.p_strKey
- The key.- Returns:
- The localized string.
-
getByApp
Get a localized string in the context language given its key.If there is no value for the given key in the context language, the default language of the portal is used as a fallback. If no fallback is available then the given fallback will be returned.
- Parameters:
p_strAppGuid
- The GUID of the application the key belongs to.p_strKey
- The key.p_strFallbackValue
- A fallback value that is returned if no value could be found for the given key.- Returns:
- The localized string.
-
getByAppByLang
Get a localized string in the given language for the given key.If there is no value for the given key in the given language, the default language of the portal is used as a fallback. If no fallback is available
null
will be returned.- Parameters:
p_strAppGuid
- The GUID of the application the key belongs to.p_strLang
- The language.p_strKey
- The key.- Returns:
- The localized string.
-
getByAppByLang
public String getByAppByLang(String p_strAppGuid, String p_strLang, String p_strKey, String p_strFallbackValue) Get a localized string in the given language for the given key.If there is no value for the given key in the given language, the default language of the portal is used as a fallback. If no fallback is available then the given fallback will be returned.
- Parameters:
p_strAppGuid
- The GUID of the application the key belongs to.p_strLang
- The language.p_strKey
- The key.p_strFallbackValue
- A fallback value that is returned if no value could be found for the given key.- Returns:
- The localized string.
-