Package org.bgerp.app.l10n

# Class Localizer

java.lang.Object
org.bgerp.app.l10n.Localizer

Direct Known Subclasses:
  `TransparentLocalizer`

public class Localizer extends Object
Translator to a wanted language using many `Localization` sequentially.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final Localizer`
  `TRANSPARENT`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Localizer(String lang, Localization... localizations)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Map.Entry<String,String>`
  `entry(String key)`
  `String`
  `getLang()`
  `String`
  `l(String pattern, Object... args)`
  Translates to target language.

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

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### TRANSPARENT

    public static final Localizer TRANSPARENT

- ## Constructor Details

  - ### Localizer

    public Localizer(String lang, Localization... localizations)

- ## Method Details

  - ### getLang

    public String getLang()
    Returns:
      target language.

  - ### l

    public String l(String pattern, Object... args)
    Translates to target language.
    Parameters:
      `pattern` - string message with '{}' placeholders.
      `args` - arguments for replacing placeholders.
    Returns:

  - ### entry

    public Map.Entry<String,String> entry(String key)
    Returns:
      a map entry with `key` and a found translation for it.