[API] Languages 1.5

No more barriers between languages!

  1. gaelitoelquesito
    Tested Minecraft Versions:
    • 1.8
    • 1.9
    • 1.10
    Contributors:
    IhToN
    [​IMG]



    Languages is a simple API who allows to use diferents languages in a server.

    Spanish review by Maximiliano

    [​IMG]

    To use Languages you only must add it into your plugins folder and restart your server. You need also a plugin who use it.

    If you want to add your own languages files to a plugin, only copy its default language file and start translating!

    [​IMG]

    • /setLang [LANG] - Sets a player language. If arg. lang is empty, Languages will get his language from Minecraft.
    • /langReload - Reloads all languages from all plugins!
    • /langPlugins- Shows a full list of plugins who supports Languages, and its languages.

    [​IMG]

    • languages.langreload - Allows to use /langReload
    • languages.langplugins- Allows to use /langPlugins

    [​IMG]

    The configuration of Languages is pretty simple!

    • DataBase - In there you can add a MySQL or SQLite database. If you need help please check this web: http://wiki.bukkit.org/Bukkit.yml#database
    • DefLang - You can select the default language in your server with this node.
    • getMinecraftLang - If true, Languages will get all languages from Minecraft; if not, it will use the default language on the config file.
    Code (Text):
    database:
      driver: org.sqlite.JDBC
      url: jdbc:sqlite:{DIR}{NAME}.db
      username: bukkit
      password: walrus
      isolation: SERIALIZABLE
      logging: true
    DefLang: en_US
    firstJoin:
      getMinecraftLang: true

    [​IMG]

    This is a guide who explains who works Languages and how you can work with it.

    - Step 1:

    In your plugin resources, create a yml with the name "en_US.yml". en_US is the default language of Languages. You can also create more YAML files, like "es_ES.yml". Languages will detect them!

    [​IMG]

    - Step 2:


    In each language YAML, add the node "prefix". This node will be the prefix of your plugin!
    [​IMG]

    - Step 3:


    Go to your class Main, and in the first line of the method onEnable(), write this:
    Code (Text):
    LanguageUtils.loadPlugin(this);

    Now create a listener class and write this:
    Code (Text):
    @EventHandler
    public void langs(LangsLoadEvent e) {
        e.addPlugin(YOUR PLUGIN INSTANCE);
    }

    - Step 4:

    Use the class SendManager to send or get messages!

    - Extra:

    • If you want to add messages to your plugin, only write them in your YAMLs! Languages will add them automatically.
    • You can get the default language at Languages.getDefaultLanguage();

    - Step 1:

    In your plugin resources, create a folder with this name:

    Code (Text):
    <PLUGIN ID>_languages
    There we will add all language files.

    Now create a yml with the name "en_US.yml". en_US is the default language of Languages. You can also create more YAML files, like "es_ES.yml". Languages will detect them!

    [​IMG]

    - Step 2:


    In each language YAML, add the node "prefix". This node will be the prefix of your plugin!
    [​IMG]

    - Step 3:

    Go to your main class and add "languages" as a dependency.

    [​IMG]

    After this, add this line to your enable listener:

    [​IMG]

    And create this listener:

    [​IMG]


    Ready!

    Now you can use the Class SendManager to send messages to your players or get them!

    [​IMG]



    If you have any issue or question, please send me a PM and don't write it in a review! I'll ignore it.[/SPOILER]

Recent Updates

  1. New update!
  2. New update!
  3. New update!

Recent Reviews

  1. HappyIceGriefYT
    HappyIceGriefYT
    4/5,
    Version: 1.5
    Hello! What plugins does it support? I just have the /langplugins command output a list of available languages.
  2. xELITESx
    xELITESx
    1/5,
    Version: 1.5
    not work------------------------------------------------------------------------------------
  3. Geometry
    Geometry
    5/5,
    Version: 1.5
    exelent plugin dd
  4. GFrancoH36
    GFrancoH36
    5/5,
    Version: 1.5
    Excelente Plugin! Sin errores, te mereces las 5 Estrellas :D

    Testing in BuildNation.mcnetwork.me (24/7)
  5. NinjaPvpGamerBR
    NinjaPvpGamerBR
    5/5,
    Version: 1.5
    ..............................................................................
    Please add support for ProBedwars plugin
    This will help a lot!
    ..............................................................................
  6. ProGums
    ProGums
    5/5,
    Version: 1.5
    Good, how to work with placeholderapi?, and very good plugin
    .......................................
    .
    .
    Like.
  7. Betob89
    Betob89
    5/5,
    Version: 1.5
    10/10 .
  8. Quixono_YT
    Quixono_YT
    5/5,
    Version: 1.4
    ¡Hola! Me gustaria saber si funciona con cualquier plugin, gracias :) Si es así, el plugin está muy bien, enhorabuena
  9. Josn3rDev
    Josn3rDev
    5/5,
    Version: 1.4
    Todo excelente, un genial plugin, aunque me gustaría que tuviera soporte para la 1.7! D: ¿Serás que puedes hacerlo?.
  10. JohanGamer
    JohanGamer
    5/5,
    Version: 1.4
    Buen plugin!, pero mi duda es: ¿sirve para servidores dedicados?. O solo para servidores con bungeee.
    1. gaelitoelquesito
      Author's Response
      Hola! Sirve para todo tipos de Spigot. :D