reddvilzz

Untitled

May 8th, 2017
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. package net.minecraft.client.resources;
  2.  
  3. import net.minecraftforge.fml.relauncher.Side;
  4. import net.minecraftforge.fml.relauncher.SideOnly;
  5.  
  6. @SideOnly(Side.CLIENT)
  7. public class I18n
  8. {
  9. private static Locale i18nLocale;
  10.  
  11. static void setLocale(Locale i18nLocaleIn)
  12. {
  13. i18nLocale = i18nLocaleIn;
  14. }
  15.  
  16. /**
  17. * Translates the given string and then formats it. Equivilant to String.format(translate(key), parameters).
  18. */
  19. public static String format(String translateKey, Object... parameters)
  20. {
  21. return i18nLocale.formatMessage(translateKey, parameters);
  22. }
  23.  
  24. public static boolean hasKey(String key)
  25. {
  26. return i18nLocale.hasKey(key);
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment