mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-26 22:59:57 +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;
|
static $lang_selected = null;
|
||||||
if(!$lang_selected)
|
if(!$lang_selected)
|
||||||
{
|
{
|
||||||
$orig_lang_file = _XE_PATH_ . 'common/lang/lang.info';
|
|
||||||
$selected_lang_file = _XE_PATH_ . 'files/config/lang_selected.info';
|
$selected_lang_file = _XE_PATH_ . 'files/config/lang_selected.info';
|
||||||
if(!FileHandler::hasContent($selected_lang_file))
|
if(!FileHandler::hasContent($selected_lang_file))
|
||||||
{
|
{
|
||||||
|
|
@ -687,9 +686,13 @@ class Context
|
||||||
|
|
||||||
if(!FileHandler::hasContent($selected_lang_file))
|
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);
|
FileHandler::writeFile($selected_lang_file, $buff);
|
||||||
$lang_selected = self::loadLangSupported();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
ko,한국어
|
|
||||||
en,English
|
|
||||||
jp,日本語
|
|
||||||
zh-CN,中文(中国)
|
|
||||||
zh-TW,中文(臺灣)
|
|
||||||
fr,Français
|
|
||||||
de,Deutsch
|
|
||||||
ru,Русский
|
|
||||||
es,Español
|
|
||||||
tr,Türkçe
|
|
||||||
vi,Tiếng Việt
|
|
||||||
mn,Mongolian
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue