mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-21 19:32:15 +09:00
Enable multi-language for site title and subtitle
This commit is contained in:
parent
e90f60de22
commit
d87bbf635c
4 changed files with 32 additions and 13 deletions
|
|
@ -875,9 +875,11 @@ class Context
|
|||
*/
|
||||
public static function getBrowserTitle()
|
||||
{
|
||||
$oModuleController = getController('module');
|
||||
$oModuleController->replaceDefinedLangCode(self::$_instance->site_title);
|
||||
|
||||
if (!self::$_instance->site_title)
|
||||
{
|
||||
return '';
|
||||
}
|
||||
getController('module')->replaceDefinedLangCode(self::$_instance->site_title);
|
||||
return htmlspecialchars(self::$_instance->site_title, ENT_COMPAT | ENT_HTML401, 'UTF-8', FALSE);
|
||||
}
|
||||
|
||||
|
|
@ -889,7 +891,16 @@ class Context
|
|||
public static function getSiteTitle()
|
||||
{
|
||||
$moduleConfig = getModel('module')->getModuleConfig('module');
|
||||
return isset($moduleConfig->siteTitle) ? trim($moduleConfig->siteTitle) : '';
|
||||
if (isset($moduleConfig->siteTitle))
|
||||
{
|
||||
$title = trim($moduleConfig->siteTitle);
|
||||
getController('module')->replaceDefinedLangCode($title);
|
||||
return $title;
|
||||
}
|
||||
else
|
||||
{
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -900,7 +911,16 @@ class Context
|
|||
public static function getSiteSubtitle()
|
||||
{
|
||||
$moduleConfig = getModel('module')->getModuleConfig('module');
|
||||
return isset($moduleConfig->siteSubtitle) ? trim($moduleConfig->siteSubtitle) : '';
|
||||
if (isset($moduleConfig->siteSubtitle))
|
||||
{
|
||||
$subtitle = trim($moduleConfig->siteSubtitle);
|
||||
getController('module')->replaceDefinedLangCode($subtitle);
|
||||
return $subtitle;
|
||||
}
|
||||
else
|
||||
{
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue