Class LocaleService

java.lang.Object
preponderous.ponder.minecraft.bukkit.services.LocaleService

public class LocaleService extends Object
  • Constructor Details

    • LocaleService

      public LocaleService(PonderMC ponder)
  • Method Details

    • initialize

      public void initialize(ArrayList<String> supportedLanguageIDs, String pluginFolderPath, String pluginName, String defaultLanguageID)
    • getCurrentLanguageID

      public String getCurrentLanguageID()
    • setCurrentLanguageID

      public void setCurrentLanguageID(String ID)
    • getText

      public String getText(String key)
    • loadTranslationKeysAndStrings

      public void loadTranslationKeysAndStrings()
    • reloadTranslationKeysAndStrings

      public void reloadTranslationKeysAndStrings()
    • isLanguageIDSupported

      public boolean isLanguageIDSupported(String ID)
    • getSupportedLanguageIDsSeparatedByCommas

      public String getSupportedLanguageIDsSeparatedByCommas()
    • isFilePresent

      public boolean isFilePresent(String path)
      Method to check if a file is present.
    • loadFromPluginFolder

      public void loadFromPluginFolder()
      Method to load from the plugin folder.
    • loadFromFile

      public void loadFromFile(File file)
      Helper method to load from a file.
    • updateCurrentLocalLanguageFile

      public void updateCurrentLocalLanguageFile()
      Method to updated the current language file.
    • getResourceAsInputStream

      public InputStream getResourceAsInputStream(String fileName)
    • loadFromResource

      public void loadFromResource()
      Method to load from a resource associated with the current language ID.
    • loadMissingKeysFromInputStream

      public void loadMissingKeysFromInputStream(InputStream inputStream)
    • getPairFromLine

      public Pair<String,​String> getPairFromLine(String line)
    • saveToPluginFolder

      public void saveToPluginFolder()
      Method to save to the plugin folder.
    • sortKeys

      public void sortKeys()