Class Translations

java.lang.Object
net.minheur.potoflux.translations.Translations

public class Translations extends Object
the class that handle translations
  • Constructor Details

    • Translations

      public Translations()
  • Method Details

    • registerTranslations

      public static void registerTranslations(AbstractTranslationsRegistry registry)
      Adds a translation registry to allTranslations
      Parameters:
      registry - the reg to add translations from
    • load

      public static boolean load(Lang lang)
      Allow to change loadedLang
      Parameters:
      lang - the lang you want to load
      Returns:
      if the loaded lang has changed
    • load

      public static boolean load(String langCode)
      Allow to change loadedLang, by a lang code (String)
      Parameters:
      langCode - the code of the lang you want to load
      Returns:
      if the loaded lang has changed
    • get

      public static String get(String key)
      Get a translation in the loadedLang from its key
      Parameters:
      key - the key of the translation to get
      Returns:
      the translation of the key in the loadedLang