mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Fixed a problem caused by "-x-" variations of a translation, such as fr-x-strict and de-x-sie. We're now sending the main language code to the output so it will at least be a valid language code
git-svn-id: file:///svn/phpbb/trunk@8311 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
5dddcb42ae
commit
159ce6f8d1
1 changed files with 8 additions and 1 deletions
|
@ -3190,6 +3190,13 @@ function page_header($page_title = '', $display_online_list = true)
|
||||||
// Which timezone?
|
// Which timezone?
|
||||||
$tz = ($user->data['user_id'] != ANONYMOUS) ? strval(doubleval($user->data['user_timezone'])) : strval(doubleval($config['board_timezone']));
|
$tz = ($user->data['user_id'] != ANONYMOUS) ? strval(doubleval($user->data['user_timezone'])) : strval(doubleval($config['board_timezone']));
|
||||||
|
|
||||||
|
// Send a proper content-language to the output
|
||||||
|
$user_lang = $user->lang['USER_LANG'];
|
||||||
|
if (strpos($user_lang, '-x-') !== false)
|
||||||
|
{
|
||||||
|
$user_lang = substr($user_lang, 0, strpos($user_lang, '-x-'));
|
||||||
|
}
|
||||||
|
|
||||||
// The following assigns all _common_ variables that may be used at any point in a template.
|
// The following assigns all _common_ variables that may be used at any point in a template.
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'SITENAME' => $config['sitename'],
|
'SITENAME' => $config['sitename'],
|
||||||
|
@ -3248,7 +3255,7 @@ function page_header($page_title = '', $display_online_list = true)
|
||||||
'S_VIEWTOPIC' => false,
|
'S_VIEWTOPIC' => false,
|
||||||
'S_VIEWFORUM' => false,
|
'S_VIEWFORUM' => false,
|
||||||
'S_USER_PM_POPUP' => $user->optionget('popuppm'),
|
'S_USER_PM_POPUP' => $user->optionget('popuppm'),
|
||||||
'S_USER_LANG' => $user->lang['USER_LANG'],
|
'S_USER_LANG' => $user_lang,
|
||||||
'S_USER_BROWSER' => (isset($user->data['session_browser'])) ? $user->data['session_browser'] : $user->lang['UNKNOWN_BROWSER'],
|
'S_USER_BROWSER' => (isset($user->data['session_browser'])) ? $user->data['session_browser'] : $user->lang['UNKNOWN_BROWSER'],
|
||||||
'S_USERNAME' => $user->data['username'],
|
'S_USERNAME' => $user->data['username'],
|
||||||
'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],
|
'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],
|
||||||
|
|
Loading…
Add table
Reference in a new issue