mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
Fixed languages-not-found bug (#5272)
* Fixed languages-not-found bug * Update Language.php Co-authored-by: Dylan T <odigiman@gmail.com>
This commit is contained in:
parent
b7a15b6e01
commit
9e0b4621be
@ -68,10 +68,14 @@ class Language{
|
|||||||
$result = [];
|
$result = [];
|
||||||
|
|
||||||
foreach($files as $file){
|
foreach($files as $file){
|
||||||
$code = explode(".", $file)[0];
|
try{
|
||||||
$strings = self::loadLang($path, $code);
|
$code = explode(".", $file)[0];
|
||||||
if(isset($strings["language.name"])){
|
$strings = self::loadLang($path, $code);
|
||||||
$result[$code] = $strings["language.name"];
|
if(isset($strings["language.name"])){
|
||||||
|
$result[$code] = $strings["language.name"];
|
||||||
|
}
|
||||||
|
}catch(LanguageNotFoundException $e){
|
||||||
|
// no-op
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user