mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-01 12:05:37 +02:00
Changes to language functionality.
Notes to translators: * Language directory should where possible be named xx[_yy[_zz]] as appropriate for the language code (lower case with underscores to separate) * USER_LANG should contain the relevant iso code which is returned with page content (ie en-gb for the default language pack) git-svn-id: file:///svn/phpbb/trunk@6468 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
9cfa28b502
commit
91dcde955e
@ -147,7 +147,7 @@ function adm_page_header($page_title)
|
||||
'ICON_SYNC' => '<img src="' . $phpbb_admin_path . 'images/icon_sync.gif" alt="' . $user->lang['RESYNC'] . '" title="' . $user->lang['RESYNC'] . '" />',
|
||||
'ICON_SYNC_DISABLED' => '<img src="' . $phpbb_admin_path . 'images/icon_sync_disabled.gif" alt="' . $user->lang['RESYNC'] . '" title="' . $user->lang['RESYNC'] . '" />',
|
||||
|
||||
'S_USER_LANG' => $user->data['user_lang'],
|
||||
'S_USER_LANG' => $user->lang['USER_LANG'],
|
||||
'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],
|
||||
'S_CONTENT_ENCODING' => 'UTF-8',
|
||||
'S_CONTENT_DIR_LEFT' => $user->lang['LEFT'],
|
||||
|
@ -3212,7 +3212,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->data['user_lang'],
|
||||
'S_USER_LANG' => $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'],
|
||||
|
@ -120,8 +120,8 @@ if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) && !$language)
|
||||
$accept_lang_ary = explode(',', strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']));
|
||||
foreach ($accept_lang_ary as $accept_lang)
|
||||
{
|
||||
// Set correct format ... guess full xx-yy form
|
||||
$accept_lang = substr($accept_lang, 0, 2) . '-' . substr($accept_lang, 3, 2);
|
||||
// Set correct format ... guess full xx_yy form
|
||||
$accept_lang = substr($accept_lang, 0, 2) . '_' . substr($accept_lang, 3, 2);
|
||||
|
||||
if (file_exists($phpbb_root_path . 'language/' . $accept_lang))
|
||||
{
|
||||
@ -130,7 +130,7 @@ if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) && !$language)
|
||||
}
|
||||
else
|
||||
{
|
||||
// No match on xx-yy so try xx
|
||||
// No match on xx_yy so try xx
|
||||
$accept_lang = substr($accept_lang, 0, 2);
|
||||
if (file_exists($phpbb_root_path . 'language/' . $accept_lang))
|
||||
{
|
||||
@ -311,7 +311,7 @@ class module
|
||||
}
|
||||
|
||||
define('HEADER_INC', true);
|
||||
global $template, $lang, $language, $stage, $phpbb_root_path;
|
||||
global $template, $lang, $stage, $phpbb_root_path;
|
||||
|
||||
$template->assign_vars(array(
|
||||
'L_CHANGE' => $lang['CHANGE'],
|
||||
@ -324,7 +324,7 @@ class module
|
||||
'S_CONTENT_ENCODING' => 'UTF-8',
|
||||
'S_CONTENT_DIR_LEFT' => $lang['LEFT'],
|
||||
'S_CONTENT_DIR_RIGHT' => $lang['RIGHT'],
|
||||
'S_USER_LANG' => $language,
|
||||
'S_USER_LANG' => $lang['USER_LANG'],
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -36,7 +36,7 @@ $lang = array_merge($lang, array(
|
||||
'LEFT' => 'left',
|
||||
'RIGHT' => 'right',
|
||||
'DATE_FORMAT' => '|d M Y|',
|
||||
'HTML_LANG' => 'en_EN',
|
||||
'USER_LANG' => 'en-gb',
|
||||
|
||||
'1_DAY' => '1 day',
|
||||
'1_MONTH' => '1 month',
|
||||
|
Loading…
x
Reference in New Issue
Block a user