// Get translation for an ItemStack ItemStack item
=new ItemStack
(Material.
DIAMOND_SWORD); String itemTranslation
= lang.
getItemTranslate(item
);
// Directly read the translation from the language pack. String translation
= getString
("item.minecraft.diamond_sword");
// Get translation for an item name String itemTranslationByName
= lang.
getItemTranslate("DIAMOND_SWORD");
// Get translation for an EntityType String entityTranslation
= lang.
getEntityTranslate(EntityType.
CREEPER);
// Get translation for an entity name String entityTranslationByName
= lang.
getEntityTranslate("CREEPER");
// Get translation for an enchantment (version 1.0.8 add) String enchantmentTranslationByName
= lang.
getEnchantmentTranslate(Enchantment.
SILK_TOUCH);
// Get translation for an enchantment name (version 1.0.8 add) String enchantmentTranslationByName
= lang.
getEnchantmentTranslate("SILK_TOUCH"); }
TODO
Improve API documentation
Add more usage examples
Move the file download to asynchronous execution, and temporarily use en_us until the download is complete.