MultiL - Multi Language support API for your plugins!

Abandoned
MultiL - Multi Language support API for your plugins!
MultiL localizable bukkit API

MultiL - Support Api for locales

This plugin allow plugins to make custom file with locales. Every one can switch their languages with one easy command /lang <language>

To users

THIS WILL DONT TRANSLATE YOUR PLUGINS IF AUTHOR DON'T USE MULTIL! Ask plugin author to implemen MultiL :)

Commands

/lang show languages that can be chosen as player language

Config files

players.yml save players choosen languages config.yml easy to use config language.yml store pathes and values that are splited with languages and plugins parts

How to use for programmers

Download and import my plugin to build path. Then add import:

import pl.Sahee.MultiL.Api;

try catch errorw while creating instance of my plugin api:

MultiLApi  multiLApi = new MultiLApi(JavaPlugin);

then add your custom valuse using

multiLApi.addValue();

every single value have to have default value (addAsDefault) last parametr in addValue. Try to make default values in english :)

then fill allother languages with default valuse using

multiLApi.fillRestServerLanguagesWithDefaultValues()

remember to add depend/softdepend to your plugin.yml file :)

Code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import pl.Sahee.MultiL.Api.MultiLApi;

public class TestClass extends JavaPlugin {
    MultiLApi mApi;
    public void onEnable() {

        mApi = new MultiLApi(this);
        List<String> array = new ArrayList<String>();
        help.add("1st line in polish");
        help.add("second line in polish");
        mApi.addValue("help", help, "polish", false);
        mApi.addValue("badSender", "Random wolrd in polish", "polish", false);    
        
        help.clear();
        help.add("1st line in array in english");
        help.add("There is no second line?");
        mApi.addValue("help", help, "english", true);
        mApi.addValue("badSender", "You can't use this command as console.", "english", true); 
        
        mApi.fillRestServerLanguagesWithDefaultValues(); // fill rest languages with default settings. if some setting is not set will be null!

                //now u can get path using:
        mApi.getPathValue(path, player)
                // or ge player selected language
        mApi.getPlayerLanguage(Player);
    }
}

Plugins that use MultiL

Noone for now. White to me if u used this :)

The MultiL - Multi Language support API for your plugins! Team

profile avatar
  • 3
    Projects
  • 27.3K
    Downloads

More from _ForgeUser8171277