mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 00:07:30 +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 = [];
|
||||
|
||||
foreach($files as $file){
|
||||
$code = explode(".", $file)[0];
|
||||
$strings = self::loadLang($path, $code);
|
||||
if(isset($strings["language.name"])){
|
||||
$result[$code] = $strings["language.name"];
|
||||
try{
|
||||
$code = explode(".", $file)[0];
|
||||
$strings = self::loadLang($path, $code);
|
||||
if(isset($strings["language.name"])){
|
||||
$result[$code] = $strings["language.name"];
|
||||
}
|
||||
}catch(LanguageNotFoundException $e){
|
||||
// no-op
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user