Skip to content

ExodusDevs/Translation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TranslationAPI

A translation library for your code from PocketMine-MP 4.0.0 or earlier

How to use it?

First you initialize the class, then use its methods

//$this = PluginBase class
$translation = new Translation($this);

First choose the default language to use if that language does not exist

//use class
use exodus\translation\Language;

//i will use the language of the USA
$translation->setDefaultLanguage(new Language("en_US", "English Language", ["welcome-message" => "%username% joined!!"]));

after this...

$translation->send($player, "welcome-message", ["username" => $player->getName()]);

this beautiful code xd

Releases

No releases published

Packages

 
 
 

Languages