Advanced Multi Language
2.0.6An extensive MultiLanguage Plugin with dev's API! A must have for your server!
Welcome to the official spigot page of this plugin: Advanced Multi Language!
This plugin is created with spigot 1.14.4 but it works with 1.8.x and up.
Support for BungeeCord since version 1.4!
What does this plugin?
This plugin let your players select their language with a simple command, yes simple. Just the translation of "language" in their own language ;)
But, yeah ... if they have set their language and then?
Well, then you could send players messages from the server in their selected language with the easy to use API.
With this API developers could get the language of the player and send them a message in their language! :D
It sends different messages to players based on their language, it does NOT translate the ingame chat messages!
If you are a server owner
Hi there ;)
You only needs to put this plugin in your plugins folder and restart the server so the plugin is loaded.
Attention: you must create the database mannualy if you want to use MySQL! The table is going to create automatically :)
Let the players set their language with one of the commands.
You can choose between MySQL or flatfile saving in the config file.
Every language can be disabled in het config.yml if you want that players can't choose that language.
I recommend to use the MySQL if you use BungeeCord so the data is the same accross your network.
Commands
/language <language>
/langue <langue>
/sprache <sprache>
/taal <taal>
/idioma <idioma>
/язык <язык>
/valoda <valoda>
/sprog <sprog>
/език <език>
/语言 <语言>
/nyelv <nyelv>
/lingua <lingua>
/język <język>
/jezik <jezik>
/linguagem <linguagem>
/jezik <jezik>
/kalba <kalba>
/dil <dil>
/jazyk <jazyk>
/언어 <언어>
/limba <limba>
Supported languages
Current supported languages:
- English: EN
- French: FR
- German: DE
- Dutch: NL
- Spanish: ES
- Russian: RU
- Latvian: LV
- Italian: IT
- Bulgarian: BG
- Hungarian: HU
- Dansk: DK
- Chinese: CHS
- Polish: PL
- Portuguese: PT
- Slovenia: SLO
- Lithuanian: LT
- Turkish: TK
- Slovak: SK
- Czech: CS
- Korean: KO
- Romanian: RO
- More coming soon*
Developers & API
Its just easy to get the language of the player.
All you need to do is using this code:
String language = AdvancedMultiLanguageAPI.getLanguageOfUuid(String uuid);
String uuid = the UUID of the player .toString() so of you have a player you could use player.getUniqueId().toString();
You recieve the language of a player in an abbreviation.
The abbreviations are:
- For English: EN
- For French: FR
- For German: DE
- For Dutch: NL
- For Spanish: ES
- For Russian: RU
- For Latvian: LV
- For Italian: IT
- For Bulgarian: BG
- For Hungarian: HU
- For Dansk: DK
- For Chinese: CHS
- For Polish: PL
- For Portuguese: PT
- For Slovenia: SLO
- For Lithuanian: LT
- For Turkish: TK
- For Slovak: SK
- For Czech: CS
- For Korean: KO
- For Romanian: RO
- More coming soon*
Once you retrieved the language you can get the translated message for example of a file under /plugins/<plugin>/messages with a file named EN.yml
This is all your choice. :)
Here you have a comprehensively example with a joinEvent
@EventHandler
public void onPlayerJoin(PlayerJoinEvent event) {
Player player = event.getPlayer();
String uuid = player.getUniqueId().toString();
String language = AdvancedMultiLanguage.getLanguageOfUuid(uuid);
//Check if the language is English
if(language.equalsIgnoreCase("EN")) {
player.sendMessage(ChatColor.YELLOW + "Welcome to the server " + player.getName() + "!");
}
//Check if the language is Dutch
if(language.equalsIgnoreCase("NL")) {
player.sendMessage(ChatColor.YELLOW + "Welkom op de server " + player.getName() + "!");
}
//Check if the language is French
if(language.equalsIgnoreCase("FR")) {
player.sendMessage(ChatColor.YELLOW + "Bienvenue sur le serveur " + player.getName() + "!");
}
}
Or the New method in the API.
Get the translated message located in plugins\<your plugin>\messages\EN.yml
EN is the language such as EN.yml, NL.yml, DE.yml, FR.yml, ...
The path is the path in the config, example: "usage" or "messages.usage".
An example to use here:
Player p = (Player) sender;
String message = AdvancedMultiLanguageAPI.getMessage(p.getUniqueId().toString(), "usage", Main.plugin.getName());
sender.sendMessage(message);
If a player changes his language will an event being called.
You can listen it with the following code as example.
@EventHandler
public void onPlayerChangeLanguage(LanguageChangeEvent event) {
// you can get the player that changes his language
Player player = event.getPlayer();
// you can get the language that the player is changing to
Language language = event.getLanguage();
// you can cancel the event
event.setCancelled(true);
}
@x9nico made a nice tutorial about how to use the API of this plugin.
The video is French sproken. Thanks to him for creating it :D

*New languages
Please, send me a PM to suggest new languages.
What must be in your PM:
- Translation of "Usage: /language <language>"
- Translation of "This language is disabled."
- Name of your language in your own language.
- Translation of the name in English.
- Translation of "Your language is set to {English}"
- Translation of "Only ingame players can set their language."
- The abbreviation of your language
- Translation of ""Language {English} not found."
- Translation of "Attention! You may not speak {English} in the chat."
Example for a Dutch suggestion:
- Gebruik: /taal <taal>
- Deze taal is uitgeschakeld.
- Nederlands
- Dutch
- Uw taal is ingesteld op English.
- Enkel ingame spelers kunnen hun taal instellen.
- NL
- Taal Engels niet gevonden.
- Opgelet! Je mag geen Engels spreken in de chat.
Default Config
http://pastebin.com/zLkhLBEb
ToDo
Adding support for BungeeCordDone! (since version 1.4)- Adding more languages
- Adding messages.yml
- ... tell me ...
Plugins using this API
- Information | Forum - TS - Website & more
- OneTimeCommand
- PlayerInfo
- Utilities
- Send me a PM with the link to your plugin if he uses the API.
Donations
If you like my work and would support me and motivate me to make more plugins you could donate to me (I really appreciate that!)
About me
I'm the proud developer of this resource and I hope other developers shall use the API in their plugins.
You can follow me on twitter: www.twitter.com/smessie_ for updates and more.
I have an own MC network, it's Dutch so if you are a Dutch speaker or you like Dutch people you may join this fancy server on play.SmessieCraft.com :eek:
Similar projects
Plugin →Let Me Despawn
Improves performance by tweaking mob despawn rules. Say bye to pesky unintentional persistent mobs.
26.2MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
Emotecraft
Create your own emotes in Minecraft.
7.9MSueta
Simple Tpa
A simple tpa plugin which sends requests
5.4MSueta
Common Network
Forge and Fabric Unified Networking Solution
4.7MSueta
Set Home
A lightweight plugin for players to set their homes.
3.8MSueta