An api wrapper that makes localization easier than ever.
repositories {
maven { url "https://repo.jorisg.com/snapshots" }
}
dependencies {
compileOnly 'com.guflimc.brick.i18n:spigot-api:+'
}
You can find the javadocs for all platforms here
void onEnable() {
// initialize
SpigotTranslator translator = new SpigotTranslator(this, Locale.ENGLISH);
translator.importTranslations(this);
translator.importTranslations(otherJavaPlugin);
// send message
translator.send(player, "welcome", sender.getName());
}
resources/languages/en.json
{
"welcome": "Welcome to the server {0}!"
}
More information
Check out the documentation for more information.