Package com.logicaldoc.core.automation
Class I18NTool
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<String,
String>
Utility class to handle translations from inside Automation
- Since:
- 7.3
- Author:
- Marco Meschieri - LogicalDOC
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,
V>, AbstractMap.SimpleImmutableEntry<K, V> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionPrints a formatted stringPrints a formatted stringPrints a formatted stringPrints a formatted stringPrints a formatted stringPrints a formatted stringGets the not formatted stringMethods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, getOrDefault, isEmpty, keySet, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Constructor Details
-
I18NTool
public I18NTool() -
I18NTool
-
-
Method Details
-
format
Prints a formatted string- Parameters:
key
- key of the string in the localization bundlevalue
- is replaced into the {0} place holder- Returns:
- the formatted string
-
format
Prints a formatted string- Parameters:
key
- key of the string in the localization bundlevalue1
- is replaced into the {0} place holdervalue2
- is replaced into the {1} place holder- Returns:
- the formatted string
-
format
Prints a formatted string- Parameters:
key
- key of the string in the localization bundlevalue1
- is replaced into the {0} place holdervalue2
- is replaced into the {1} place holdervalue3
- is replaced into the {2} place holder- Returns:
- the formatted string
-
format
Prints a formatted string- Parameters:
key
- key of the string in the localization bundlevalue1
- is replaced into the {0} place holdervalue2
- is replaced into the {1} place holdervalue3
- is replaced into the {2} place holdervalue4
- is replaced into the {3} place holder- Returns:
- the formatted string
-
format
public String format(String key, String value1, String value2, String value3, String value4, String value5) Prints a formatted string- Parameters:
key
- key of the string in the localization bundlevalue1
- is replaced into the {0} place holdervalue2
- is replaced into the {1} place holdervalue3
- is replaced into the {2} place holdervalue4
- is replaced into the {3} place holdervalue5
- is replaced into the {4} place holder- Returns:
- the formatted string
-
format
Prints a formatted string- Parameters:
key
- key of the string in the localization bundlevalues
- used to fill the place holders{X}
will be replaced withvalues[X-1]
- Returns:
- the formatted string
-
get
Gets the not formatted string
-