Skip to content
Cnly edited this page Feb 26, 2015 · 1 revision

locales

The locales framework

  • easily get localized strings

e.g.

// The following line creates a locale manager with locale "zh_CN"
locale = new CrafterLocaleManager("zh_CN", this.getDataFolder(), true, this); // 'true' tells it to copy a default
                                                                              // locale file from jar at
                                                                              // /locales/zh_CN.yml to the data 
                                                                              // folder; 'this' is your JavaPlugin
String localizedString = locale.getLocalizedString("msg1");
Clone this wiki locally