Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

KettleMC-Network/LanguageAPI

Repository files navigation

🌎 LanguageAPI

A simple language api for translating plugins into multiple languages. The messages are saved in json files and the language of a player gets saved in a SQL database.

How to use?

// Registering your plugin
LanguageAPI api = LanguageAPI.registerAPI("YourPluginID");

Every plugin has an ID. The language files for a plugin will be saved in languages/<ID>/<langcode>.json.

// Getting a translated message
api.getMessage("path.to.message", Locale.GERMAN);
api.getMessage("path.to.other.message", player.getUniqueId.toString());

If you want to use Spigot/Velocity exclusive methods, see SpigotAdapter/VelocityAdapter.

If you're running on Spigot you can use the Skript addon this plugin provides.

[the] translated message %path% of %player%
send translated message "path.to.message" of player to player

Gradle Setup based on the CFW/VaroPlugin by Cuuky

About

Language API for KettleMC.net

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages