Merge pull request #338 from conory/pr/add_function

lang() 함수 추가
This commit is contained in:
CONORY 2016-03-06 17:09:30 +09:00
commit cf26f20461
84 changed files with 285 additions and 234 deletions

View file

@ -404,14 +404,14 @@ class Debug
}
// Localize the error title.
$title = \Context::getLang('msg_server_error');
$title = lang('msg_server_error');
if ($title === 'msg_server_error')
{
$message = 'Server Error';
}
// Localize the error message.
$message = ini_get('display_errors') ? $message : \Context::getLang('msg_server_error_see_log');
$message = ini_get('display_errors') ? $message : lang('msg_server_error_see_log');
if ($message === 'msg_server_error_see_log')
{
$message = 'Your server is configured to hide error messages. Please see your server\'s error log for details.';

View file

@ -50,6 +50,16 @@ class Lang
$this->_loaded_plugins['_custom_'] = new \stdClass();
}
/**
* Return language type.
*
* @return string
*/
public function langType()
{
return $this->_language;
}
/**
* Load translations from a plugin (module, addon).
*
@ -187,6 +197,18 @@ class Lang
return $this->__call($key, $args);
}
/**
* Generic setter.
*
* @param string $key
* @param string $value
* @return void
*/
public function set($key, $value)
{
$this->__set($key, $value);
}
/**
* Magic method for translations without arguments.
*