MultiL - Multi Language support API for your plugins!

This project is abandoned and its default file will likely not work with the most recent version of Minecraft. Whether this project is out of date or its author has marked it as abandoned, this project is no longer maintained.

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 :)


Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

Categories

Members

Recent Files

Bukkit