Added base translation system

This commit is contained in:
Shoghi Cervantes
2015-04-11 01:32:08 +02:00
parent 3224cd7dc5
commit 0c041ebca3
38 changed files with 646 additions and 132 deletions

View File

@ -21,6 +21,7 @@
namespace pocketmine\command;
use pocketmine\event\TextContainer;
use pocketmine\permission\PermissibleBase;
use pocketmine\permission\PermissionAttachment;
use pocketmine\plugin\Plugin;
@ -102,6 +103,10 @@ class ConsoleCommandSender implements CommandSender{
* @param string $message
*/
public function sendMessage($message){
if($message instanceof TextContainer){
$message = $this->getServer()->getLanguage()->translate($message);
}
foreach(explode("\n", trim($message)) as $line){
MainLogger::getLogger()->info($line);
}