aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorVic D'Elfant <vic@phpbb.com>2008-01-07 13:50:56 +0000
committerVic D'Elfant <vic@phpbb.com>2008-01-07 13:50:56 +0000
commitbbf09989b02dfaee9c3fa57b01c4a5766018a5b7 (patch)
tree4e4e0fd4b0842326cc859f4dd15fa57528995c48 /phpBB/includes/functions.php
parent12a9e001837da139a9ea07b8dd52019ee071d9bd (diff)
downloadforums-bbf09989b02dfaee9c3fa57b01c4a5766018a5b7.tar
forums-bbf09989b02dfaee9c3fa57b01c4a5766018a5b7.tar.gz
forums-bbf09989b02dfaee9c3fa57b01c4a5766018a5b7.tar.bz2
forums-bbf09989b02dfaee9c3fa57b01c4a5766018a5b7.tar.xz
forums-bbf09989b02dfaee9c3fa57b01c4a5766018a5b7.zip
Same goes for the 3_0_0 branch... 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/branches/phpBB-3_0_0@8312 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index bf00beb2e1..6f11170172 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -3301,6 +3301,13 @@ function page_header($page_title = '', $display_online_list = true)
// Which 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.
$template->assign_vars(array(
'SITENAME' => $config['sitename'],
@@ -3356,7 +3363,7 @@ function page_header($page_title = '', $display_online_list = true)
'S_REGISTERED_USER' => $user->data['is_registered'],
'S_IS_BOT' => $user->data['is_bot'],
'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_USERNAME' => $user->data['username'],
'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],