mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 01:09:44 +00:00
Added fallback to BaseLang, better use by plugins
This commit is contained in:
parent
3cf42b558c
commit
d1006de421
@ -33,7 +33,7 @@ class BaseLang{
|
||||
protected $lang = [];
|
||||
protected $fallbackLang = [];
|
||||
|
||||
public function __construct($lang, $path = null){
|
||||
public function __construct($lang, $path = null, $fallback = self::FALLBACK_LANGUAGE){
|
||||
|
||||
$this->langName = strtolower($lang);
|
||||
|
||||
@ -42,7 +42,7 @@ class BaseLang{
|
||||
}
|
||||
|
||||
$this->loadLang($path . $this->langName . ".ini", $this->lang);
|
||||
$this->loadLang($path . self::FALLBACK_LANGUAGE . ".ini", $this->fallbackLang);
|
||||
$this->loadLang($path . $fallback . ".ini", $this->fallbackLang);
|
||||
}
|
||||
|
||||
public function getName(){
|
||||
|
Loading…
x
Reference in New Issue
Block a user