mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-23 12:22:15 +09:00
Simplify loading function for selected language list
This commit is contained in:
parent
f45779c3f8
commit
2a008eb2e2
2 changed files with 6 additions and 15 deletions
|
|
@ -677,7 +677,6 @@ class Context
|
|||
static $lang_selected = null;
|
||||
if(!$lang_selected)
|
||||
{
|
||||
$orig_lang_file = _XE_PATH_ . 'common/lang/lang.info';
|
||||
$selected_lang_file = _XE_PATH_ . 'files/config/lang_selected.info';
|
||||
if(!FileHandler::hasContent($selected_lang_file))
|
||||
{
|
||||
|
|
@ -687,9 +686,13 @@ class Context
|
|||
|
||||
if(!FileHandler::hasContent($selected_lang_file))
|
||||
{
|
||||
$buff = FileHandler::readFile($orig_lang_file);
|
||||
$lang_selected = Rhymix\Framework\Lang::getSupportedList();
|
||||
$buff = '';
|
||||
foreach($lang_selected as $key => $val)
|
||||
{
|
||||
$buff .= "$key,$val\n";
|
||||
}
|
||||
FileHandler::writeFile($selected_lang_file, $buff);
|
||||
$lang_selected = self::loadLangSupported();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue