Finished language localizer and added a description to it.
This commit is contained in:
@@ -17,6 +17,7 @@ import de.skate702.craftingkeys.config.GuiConfig;
|
||||
import de.skate702.craftingkeys.config.GuiConfigHandler;
|
||||
import de.skate702.craftingkeys.manager.*;
|
||||
import de.skate702.craftingkeys.proxies.CraftingKeysProxy;
|
||||
import de.skate702.craftingkeys.util.LanguageLocalizer;
|
||||
import de.skate702.craftingkeys.util.Logger;
|
||||
import de.skate702.craftingkeys.util.Util;
|
||||
import net.minecraft.client.gui.GuiEnchantment;
|
||||
|
||||
@@ -3,12 +3,14 @@ package de.skate702.craftingkeys.util;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
public class LanguageLocalizer {
|
||||
//TODO: Finish localizer
|
||||
public static String localizeIfPossible(String unloc){
|
||||
String localized = "";
|
||||
if(StatCollector.canTranslate(unloc)){
|
||||
localized = StatCollector.translateToLocal(unloc);
|
||||
}
|
||||
/**
|
||||
*If another language than de_DE or en_US is selected the English one is used...
|
||||
*
|
||||
* @param unloc The unlocalized string which is in the definded in the language file
|
||||
* @return localized The localized String
|
||||
*/
|
||||
public static String localize(String unloc){
|
||||
String localized = StatCollector.translateToLocal(unloc);
|
||||
return localized;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,3 +27,5 @@ de.skate702.craftingkeys.config.other.tooltip=All other settings are here!
|
||||
de.skate702.craftingkeys.warn.line1=Warning: Crafting Keys is still in development!
|
||||
de.skate702.craftingkeys.warn.line2=This mod is not complete and there are some errors left.
|
||||
de.skate702.craftingkeys.warn.line3=More Information: https://github.com/0xSeb/CraftingKeys!
|
||||
|
||||
test.test=TEST
|
||||
Reference in New Issue
Block a user