mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
Unify lang and locale config files
This commit is contained in:
parent
038a158dc7
commit
07d97242ec
7 changed files with 26 additions and 41 deletions
|
|
@ -665,7 +665,8 @@ class Context
|
|||
*/
|
||||
public static function loadLangSupported()
|
||||
{
|
||||
return Rhymix\Framework\Lang::getSupportedList();
|
||||
$list = Rhymix\Framework\Lang::getSupportedList();
|
||||
return array_map(function($val) { return $val['name']; }, $list);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -684,12 +685,12 @@ class Context
|
|||
{
|
||||
foreach ($selected as $lang)
|
||||
{
|
||||
$lang_selected[$lang] = $supported[$lang];
|
||||
$lang_selected[$lang] = $supported[$lang]['name'];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$lang_selected = $supported;
|
||||
$lang_selected = array_map(function($val) { return $val['name']; }, $supported);
|
||||
}
|
||||
}
|
||||
return $lang_selected;
|
||||
|
|
|
|||
|
|
@ -449,7 +449,7 @@ class HTMLDisplayHandler
|
|||
$locales = (include \RX_BASEDIR . 'common/defaults/locales.php');
|
||||
if (isset($locales[$lang_type]))
|
||||
{
|
||||
Context::addOpenGraphData('og:locale', $locales[$lang_type]);
|
||||
Context::addOpenGraphData('og:locale', $locales[$lang_type]['locale']);
|
||||
}
|
||||
if ($page_type === 'article' && $oDocument->getLangCode() !== $lang_type && isset($locales[$oDocument->getLangCode()]))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue