nn.pp.core

## Class T

- java.lang.Object
- - nn.pp.core.T

-     public class T
      extends java.lang.Object

  This class handles all the translation stuff

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.lang.String` | `getCharset()` Get the current character set
    `static java.lang.String` | `getLanguage()` Get the currently set language
    `static boolean` | `isLocked()` Is the translator currently allowed to accept a new language or is the language locked?
    `static void` | `lock()` Don't allow the translator to accept any further change of the language.
    `static java.lang.String` | `N_(java.lang.String s)` This method does nothing.
    `static void` | `setCatalog(java.util.ResourceBundle catalog)` Set a translation catalog directly without the need to set a language
    `static void` | `setCharset(java.lang.String charset)` Set a new character set.
    `static boolean` | `setLanguage(java.lang.String newLanguage)` Set a new language for any further translation.
    `static java.lang.String` | `T_(java.lang.String s)` Translate a string.
    `static java.lang.String` | `translate(java.lang.String s)` Returns the translation of s.
    `static void` | `unlock()` Allow the translator to accept any further change of the language.

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

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

- - ### Method Detail

    - #### translate

          public static java.lang.String translate(java.lang.String s)

      Returns the translation of s.
      Parameters:
        `s` - the key string to be translated
      Returns:
        the translation of s, or s if none is found

    - #### T_

          public static java.lang.String T_(java.lang.String s)

      Translate a string. This also marks the string for the string searcher. This way, the catalog files can be created easily.
      Parameters:
        `s` - The string to translate
      Returns:
        The translated string

    - #### N_

          public static java.lang.String N_(java.lang.String s)

      This method does nothing. It only marks the string for the string searcher. This way, the catalog files can be created easily.
      Parameters:
        `s` - The string to be found
      Returns:
        The same string

    - #### getLanguage

          public static java.lang.String getLanguage()

      Get the currently set language
      Returns:
        The current language

    - #### setLanguage

          public static boolean setLanguage(java.lang.String newLanguage)

      Set a new language for any further translation.
      Parameters:
        `newLanguage` - the name of the new language to be set
      Returns:
        true if setting the language was successful, false otherwise

    - #### setCatalog

          public static void setCatalog(java.util.ResourceBundle catalog)

      Set a translation catalog directly without the need to set a language
      Parameters:
        `catalog` - the translation catalog

    - #### lock

          public static void lock()

      Don't allow the translator to accept any further change of the language.

    - #### unlock

          public static void unlock()

      Allow the translator to accept any further change of the language.

    - #### isLocked

          public static boolean isLocked()

      Is the translator currently allowed to accept a new language or is the language locked?
      Returns:
        True if the language is locked, false if a new language is accepted

    - #### getCharset

          public static java.lang.String getCharset()

      Get the current character set
      Returns:
        The current character set

    - #### setCharset

          public static void setCharset(java.lang.String charset)

      Set a new character set. The character set is only saved here for storing purposes.
      Parameters:
        `charset` - The new character set

Copyright © 2025 Raritan Inc. All Rights Reserved.