Class LocaleService
java.lang.Object
preponderous.ponder.minecraft.bukkit.services.LocaleService
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetPairFromLine(String line)
getResourceAsInputStream(String fileName)
void
initialize(ArrayList<String> supportedLanguageIDs, String pluginFolderPath, String pluginName, String defaultLanguageID)
boolean
isFilePresent(String path)
Method to check if a file is present.boolean
void
loadFromFile(File file)
Helper method to load from a file.void
Method to load from the plugin folder.void
Method to load from a resource associated with the current language ID.void
loadMissingKeysFromInputStream(InputStream inputStream)
void
void
void
Method to save to the plugin folder.void
void
sortKeys()
void
Method to updated the current language file.
-
Constructor Details
-
LocaleService
-
-
Method Details
-
initialize
-
getCurrentLanguageID
-
setCurrentLanguageID
-
getText
-
loadTranslationKeysAndStrings
public void loadTranslationKeysAndStrings() -
reloadTranslationKeysAndStrings
public void reloadTranslationKeysAndStrings() -
isLanguageIDSupported
-
getSupportedLanguageIDsSeparatedByCommas
-
isFilePresent
Method to check if a file is present. -
loadFromPluginFolder
public void loadFromPluginFolder()Method to load from the plugin folder. -
loadFromFile
Helper method to load from a file. -
updateCurrentLocalLanguageFile
public void updateCurrentLocalLanguageFile()Method to updated the current language file. -
getResourceAsInputStream
-
loadFromResource
public void loadFromResource()Method to load from a resource associated with the current language ID. -
loadMissingKeysFromInputStream
-
getPairFromLine
-
saveToPluginFolder
public void saveToPluginFolder()Method to save to the plugin folder. -
sortKeys
public void sortKeys()
-