public class ModelLocalisation
extends java.lang.Object
de.aristaflow.adept2.model). These cannot be localised the usual way using resource
bundles since we may need all existing localisations for some use cases, e. g. all available
localisations of the instance name for a grouping worklist item have to be added to the
corresponding plugin data so that the user interface can decide later which one to use.| Modifier and Type | Field and Description |
|---|---|
static int |
CHECK_REPORT_AFFECTED_ELEMENTS
The index for localisations of check reports listing the elements affected by a check report
entry.
|
static int |
CHECK_REPORT_NO_PROBLEMS
The index for localisations of check reports indicating no problems.
|
static int |
GROUPING_ITEM_INSTANCE_NAME
The index for localisations of the instance name for a grouping item.
|
static int |
NOT_SET
The index for localisations indicating that a value has not been set.
|
| Constructor and Description |
|---|
ModelLocalisation() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
get(java.util.Collection<java.util.Locale> locales,
int key)
Gets the localisation for the designated locales for the designated key.
|
static java.util.Map<java.util.Locale,java.lang.String> |
get(int key)
Gets all available localisation for the designated key.
|
static java.lang.String |
get(java.util.Locale locale,
int key)
Gets the localisation for the designated locale or an appropriate fallback locale for the
designated key.
|
public static final int NOT_SET
public static final int GROUPING_ITEM_INSTANCE_NAME
public static final int CHECK_REPORT_AFFECTED_ELEMENTS
public static final int CHECK_REPORT_NO_PROBLEMS
public static java.lang.String get(java.util.Locale locale,
int key)
null will be returned.locale - The locale for which to get the localisation (or a fallback locale thereof).key - The key for which to get the localisation.null if no appropriate locale is found or no locale
contains a localisation for the key.public static java.lang.String get(java.util.Collection<java.util.Locale> locales,
int key)
null will be returned.locales - The locales for which to get the localisation.key - The key for which to get the localisation.null
if no locale contains a localisation for the key.public static java.util.Map<java.util.Locale,java.lang.String> get(int key)
null will be returned.key - The key for which to get the localisations.null if no locale contains a
localisation for the key.