public class L10nInstanceHelper
extends java.lang.Object
L10nInstanceHelper helper = L10nInstanceHelper.forObject(bo, customer.preferredLocale, Locale.ENGLISH)
helper.msg('somekey')
Constructor and Description |
---|
L10nInstanceHelper(java.lang.String[] paths,
java.lang.String preferredLocale,
java.util.Locale explicitFallbackLocale,
boolean returnKeyIfNotFound)
Constructor for L10nInstanceHelper.
|
Modifier and Type | Method and Description |
---|---|
static L10nInstanceHelper |
forObject(java.lang.Object boOrArray,
java.lang.String preferredLocaleCode) |
static L10nInstanceHelper |
forObject(java.lang.Object boOrArray,
java.lang.String preferredLocaleCode,
java.util.Locale explicitFallbackLocale) |
static L10nInstanceHelper |
forObject(java.lang.Object boOrArray,
java.lang.String preferredLocaleCode,
java.util.Locale explicitFallbackLocale,
boolean returnKeyIfNotFound) |
static L10nInstanceHelper |
forPaths(java.lang.String[] paths,
java.lang.String preferredLocaleCode) |
static L10nInstanceHelper |
forPaths(java.lang.String[] paths,
java.lang.String preferredLocaleCode,
java.util.Locale explicitFallbackLocale) |
static L10nInstanceHelper |
forPaths(java.lang.String[] paths,
java.lang.String preferredLocaleCode,
java.util.Locale explicitFallbackLocale,
boolean returnKeyIfNotFound) |
java.lang.String |
msg(java.lang.String key) |
java.lang.String |
msg(java.lang.String key,
java.lang.Object[] args) |
public L10nInstanceHelper(java.lang.String[] paths, java.lang.String preferredLocale, java.util.Locale explicitFallbackLocale, boolean returnKeyIfNotFound)
paths
- Paths to check for the key, in order. Nonnull.preferredLocale
- the name of the locale which is preferred when resolving the key.explicitFallbackLocale
- an explicit fallback locale. If null, then the global fallback locale of the session is used.keyIfNotFound
- if true and there is no entry for a requested key, then the key is returned. #msg()
returns null otherwise.public static L10nInstanceHelper forObject(java.lang.Object boOrArray, java.lang.String preferredLocaleCode)
public static L10nInstanceHelper forObject(java.lang.Object boOrArray, java.lang.String preferredLocaleCode, java.util.Locale explicitFallbackLocale)
public static L10nInstanceHelper forObject(java.lang.Object boOrArray, java.lang.String preferredLocaleCode, java.util.Locale explicitFallbackLocale, boolean returnKeyIfNotFound)
public static L10nInstanceHelper forPaths(java.lang.String[] paths, java.lang.String preferredLocaleCode)
public static L10nInstanceHelper forPaths(java.lang.String[] paths, java.lang.String preferredLocaleCode, java.util.Locale explicitFallbackLocale)
public static L10nInstanceHelper forPaths(java.lang.String[] paths, java.lang.String preferredLocaleCode, java.util.Locale explicitFallbackLocale, boolean returnKeyIfNotFound)
public java.lang.String msg(java.lang.String key)
public java.lang.String msg(java.lang.String key, java.lang.Object[] args)
Copyright © 2000-2025 OAshi S.à r.l. All Rights Reserved.