libLanguages ·
libLanguages is a PocketMine-MP library for making plugins support multiple languages.
- Easy To Learn: Just declare it in
onEnable()
function to use. - 2 Functions But Powerful: Just use
setLanguage()
andtranslate()
, language files will be loaded automatically inlanguages
folder in data folder.
Installation
Because of library so you need to add to your plugin by:
- Using Poggit:
...
path: ""
libs:
- src: thebigcrafter/libLanguages/libLanguages
version: ^1.0.0
...
Documentation
<?php
...
use thebigcrafter\libLanguages\Language;
...
public function onEnable() {
$this->language = new Language($this);
$this->language->setLanguage("en");
$this->getLogger()->info(Language::translate("welcome.message"));
}
...
NOTE: You need to save languages files in languages
folder in data folder manually.
License
Released under the GPL-3.0 license.