mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-18 01:42:14 +09:00
Fix #277 Incorrect priority when loading old lang files
This commit is contained in:
parent
87a3128af6
commit
0b339a9450
2 changed files with 5 additions and 9 deletions
|
|
@ -70,7 +70,7 @@ class LangParser
|
|||
unset($xml);
|
||||
|
||||
// Save the array as a cache file.
|
||||
$buff = "<?php\n";
|
||||
$buff = "<?php\n// $filename\n";
|
||||
foreach ($lang as $key => $value)
|
||||
{
|
||||
if (is_array($value))
|
||||
|
|
|
|||
|
|
@ -102,25 +102,21 @@ class Lang
|
|||
{
|
||||
$filename = $dir . '/' . $this->_language . '.php';
|
||||
}
|
||||
elseif (file_exists($dir . '/' . ($this->_language === 'ja' ? 'jp' : $this->_language) . '.lang.php'))
|
||||
{
|
||||
$filename = $dir . '/' . ($this->_language === 'ja' ? 'jp' : $this->_language) . '.lang.php';
|
||||
}
|
||||
elseif (($hyphen = strpos($this->_language, '-')) !== false)
|
||||
{
|
||||
if (file_exists($dir . '/' . substr($this->_language, 0, $hyphen) . '.php'))
|
||||
{
|
||||
$filename = $dir . '/' . substr($this->_language, 0, $hyphen) . '.php';
|
||||
}
|
||||
elseif (file_exists($dir . '/' . substr($this->_language, 0, $hyphen) . '.lang.php'))
|
||||
{
|
||||
$filename = $dir . '/' . substr($this->_language, 0, $hyphen) . '.lang.php';
|
||||
}
|
||||
}
|
||||
elseif (file_exists("$dir/lang.xml"))
|
||||
{
|
||||
$filename = Compat\LangParser::compileXMLtoPHP("$dir/lang.xml", $this->_language === 'ja' ? 'jp' : $this->_language);
|
||||
}
|
||||
elseif (file_exists($dir . '/' . ($this->_language === 'ja' ? 'jp' : $this->_language) . '.lang.php'))
|
||||
{
|
||||
$filename = $dir . '/' . ($this->_language === 'ja' ? 'jp' : $this->_language) . '.lang.php';
|
||||
}
|
||||
|
||||
// Load the language file.
|
||||
if ($filename)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue