Package com.logicaldoc.core.automation

# Class I18NTool

java.lang.Object
java.util.AbstractMap<String,String>
java.util.HashMap<String,String>
com.logicaldoc.core.automation.I18NTool

All Implemented Interfaces:
  `Serializable`, `Cloneable`, `Map<String,String>`

public class I18NTool extends HashMap<String,String>
Utility class to handle translations from inside Automation

Since:
  7.3
Author:
  Marco Meschieri - LogicalDOC
See Also:
  - Serialized Form

## Nested Class Summary

## Nested classes/interfaces inherited from class java.util.AbstractMap

`AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>`

## Nested classes/interfaces inherited from interface java.util.Map

`Map.Entry<K,V>`

## Constructor Summary

Constructors
Constructor
Description
`I18NTool()`
`I18NTool(Map<String,String> m)`

## Method Summary

Modifier and Type
Method
Description
`String`
`format(String key, String value)`
Prints a formatted string
`String`
`format(String key, String[] values)`
Prints a formatted string
`String`
`format(String key, String value1, String value2)`
Prints a formatted string
`String`
`format(String key, String value1, String value2, String value3)`
Prints a formatted string
`String`
`format(String key, String value1, String value2, String value3, String value4)`
Prints a formatted string
`String`
`format(String key, String value1, String value2, String value3, String value4, String value5)`
Prints a formatted string
`String`
`get(Object key)`
Gets the not formatted string

### Methods 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`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface java.util.Map

`equals, hashCode`

## Constructor Details

### I18NTool

public I18NTool()

### I18NTool

public I18NTool(Map<String,String> m)

## Method Details

### format

public String format(String key, String value)
Prints a formatted string

Parameters:
  `key` - key of the string in the localization bundle
  `value` - is replaced into the {0} place holder
Returns:
  the formatted string

### format

public String format(String key, String value1, String value2)
Prints a formatted string

Parameters:
  `key` - key of the string in the localization bundle
  `value1` - is replaced into the {0} place holder
  `value2` - is replaced into the {1} place holder
Returns:
  the formatted string

### format

public String format(String key, String value1, String value2, String value3)
Prints a formatted string

Parameters:
  `key` - key of the string in the localization bundle
  `value1` - is replaced into the {0} place holder
  `value2` - is replaced into the {1} place holder
  `value3` - is replaced into the {2} place holder
Returns:
  the formatted string

### format

public String format(String key, String value1, String value2, String value3, String value4)
Prints a formatted string

Parameters:
  `key` - key of the string in the localization bundle
  `value1` - is replaced into the {0} place holder
  `value2` - is replaced into the {1} place holder
  `value3` - is replaced into the {2} place holder
  `value4` - 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 bundle
  `value1` - is replaced into the {0} place holder
  `value2` - is replaced into the {1} place holder
  `value3` - is replaced into the {2} place holder
  `value4` - is replaced into the {3} place holder
  `value5` - is replaced into the {4} place holder
Returns:
  the formatted string

### format

public String format(String key, String[] values)
Prints a formatted string

Parameters:
  `key` - key of the string in the localization bundle
  `values` - used to fill the place holders `{X}` will be replaced with `values[X-1]`
Returns:
  the formatted string

### get

public String get(Object key)
Gets the not formatted string

Specified by:
  `get` in interface `Map<String,String>`
Overrides:
  `get` in class `HashMap<String,String>`
Parameters:
  `key` - the key to retrieve
Returns:
  the not formatted string