mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-25 13:22:16 +09:00
위젯 검출 정규 표현식을 수정
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2892 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
f9896fe51a
commit
90aa62a6ac
993 changed files with 9190 additions and 10457 deletions
|
|
@ -74,18 +74,18 @@
|
|||
else $this->lang_type = $this->db_info->lang_type;
|
||||
|
||||
// 등록된 기본 언어파일 찾기
|
||||
$lang_files = FileHandler::readDir('./common/lang');
|
||||
$langs = file('./common/lang/lang.info');
|
||||
$accept_lang = strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
||||
foreach($lang_files as $key => $val) {
|
||||
list($lang_prefix) = explode('.',$val);
|
||||
$lang_supported[] = $lang_prefix;
|
||||
foreach($langs as $val) {
|
||||
list($lang_prefix, $lang_text) = explode(',',$val);
|
||||
$lang_supported[$lang_prefix] = $lang_text;
|
||||
if(!$this->lang_type && ereg($lang_prefix, strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']))) {
|
||||
$this->lang_type = $lang_prefix;
|
||||
setcookie('lang_type', $this->lang_type, time()+60*60*24*365, '/');
|
||||
}
|
||||
}
|
||||
|
||||
if(!in_array($this->lang_type, $lang_supported)) $this->lang_type = $this->db_info->lang_type;
|
||||
if(!in_array($this->lang_type, array_keys($lang_supported))) $this->lang_type = $this->db_info->lang_type;
|
||||
if(!$this->lang_type) $this->lang_type = "en";
|
||||
|
||||
Context::set('lang_supported', $lang_supported);
|
||||
|
|
@ -282,6 +282,7 @@
|
|||
function setLangType($lang_type = 'ko') {
|
||||
$oContext = &Context::getInstance();
|
||||
$oContext->_setLangType($lang_type);
|
||||
$_SESSION['lang_type'] = $lang_type;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue