Class LocaleSystem

java.lang.Object
com.djrapitops.plan.settings.locale.LocaleSystem
All Implemented Interfaces:
SubSystem

@Singleton public class LocaleSystem extends Object implements SubSystem
System in charge of Locale.
  • Constructor Details Link icon

  • Method Details Link icon

    • getIdentifiers Link icon

      public static Map<String,Lang> getIdentifiers()
      Get the txt keys of all Lang entries (legacy locale files that need yml conversion).
      Returns:
      Map of txt key (eg "HTML - LOGIN_CREATE_ACCOUNT") - Lang (eg. HtmlLang.LOGIN_CREATE_ACCOUNT)
    • getKeys Link icon

      public static Map<String,Lang> getKeys()
      Get the yml keys of all Lang entries.
      Returns:
      Map of yml key (eg. "html.login.register") - Lang (eg. HtmlLang.LOGIN_CREATE_ACCOUNT)
    • enable Link icon

      public void enable()
      Description copied from interface: SubSystem
      Performs enable actions for the subsystem.
      Specified by:
      enable in interface SubSystem
    • prepareFileWatcher Link icon

      public FileWatcher prepareFileWatcher(File localeFile)
    • loadSettingLocale Link icon

      public Optional<Locale> loadSettingLocale()
    • disable Link icon

      public void disable()
      Description copied from interface: SubSystem
      Performs disable actions for the subsystem
      Specified by:
      disable in interface SubSystem
    • getLocale Link icon

      public Locale getLocale()
    • getMaxLocaleVersion Link icon

      public long getMaxLocaleVersion()
    • getLocaleVersion Link icon

      public Optional<Long> getLocaleVersion(LangCode langCode)
    • getCustomLocaleVersion Link icon

      public Optional<Long> getCustomLocaleVersion()