mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
Release preparation. New language activation and global UTF-8 charset.
This commit is contained in:
parent
a2b533bb3e
commit
5942e57b53
5 changed files with 187 additions and 15 deletions
|
@ -222,7 +222,7 @@ if (isset($_GET['pane']) && $_GET['pane'] == 'left') {
|
|||
} else {
|
||||
// Generate frameset
|
||||
$template->assign_vars(array(
|
||||
'CONTENT_ENCODING' => $bb_cfg['lang'][$userdata['user_lang']]['encoding'],
|
||||
'CONTENT_ENCODING' => $bb_cfg['charset'],
|
||||
'TPL_ADMIN_FRAMESET' => true,
|
||||
));
|
||||
send_no_cache_headers();
|
||||
|
|
2
dl.php
2
dl.php
|
@ -68,7 +68,7 @@ function send_file_to_browser($attachment, $upload_dir)
|
|||
header('Pragma: public');
|
||||
$real_filename = clean_filename(basename($attachment['real_filename']));
|
||||
$mimetype = $attachment['mimetype'] . ';';
|
||||
$charset = "charset={$bb_cfg['lang'][$userdata['user_lang']]['encoding']};";
|
||||
$charset = "charset={$bb_cfg['charset']};";
|
||||
|
||||
// Send out the Headers
|
||||
header("Content-Type: $mimetype $charset name=\"$real_filename\"");
|
||||
|
|
|
@ -161,23 +161,196 @@ $bb_cfg['posting_url'] = 'posting.php'; # "http://{$domain_name}/posting.php"
|
|||
$bb_cfg['pm_url'] = 'privmsg.php'; # "http://{$domain_name}/privmsg.php"
|
||||
|
||||
// Language
|
||||
$bb_cfg['charset'] = 'utf8'; // page charset
|
||||
$bb_cfg['charset'] = 'UTF-8'; // page charset
|
||||
$bb_cfg['auto_language'] = true; // select user-preferred language automatically
|
||||
$bb_cfg['lang'] = [
|
||||
'ru' => [
|
||||
'name' => 'Русский',
|
||||
'locale' => 'ru_RU.UTF-8',
|
||||
'encoding' => 'UTF-8',
|
||||
'af' => [
|
||||
'name' => 'Afrikaans',
|
||||
'locale' => 'af_ZA.UTF-8',
|
||||
],
|
||||
'uk' => [
|
||||
'name' => 'Український',
|
||||
'locale' => 'uk_UA.UTF-8',
|
||||
'encoding' => 'UTF-8',
|
||||
'sq' => [
|
||||
'name' => 'Albanian',
|
||||
'locale' => 'sq_AL.UTF-8',
|
||||
],
|
||||
'ar' => [
|
||||
'name' => 'Arabic',
|
||||
'locale' => 'ar_SA.UTF-8',
|
||||
],
|
||||
'hy' => [
|
||||
'name' => 'Armenian',
|
||||
'locale' => 'hy_AM.UTF-8',
|
||||
],
|
||||
'az' => [
|
||||
'name' => 'Azerbaijani',
|
||||
'locale' => 'az_AZ.UTF-8',
|
||||
],
|
||||
'be' => [
|
||||
'name' => 'Belarusian',
|
||||
'locale' => 'be_BY.UTF-8',
|
||||
],
|
||||
'bs' => [
|
||||
'name' => 'Bosnian',
|
||||
'locale' => 'bs_BA.UTF-8',
|
||||
],
|
||||
'bg' => [
|
||||
'name' => 'Bulgarian',
|
||||
'locale' => 'bg_BG.UTF-8',
|
||||
],
|
||||
'ca' => [
|
||||
'name' => 'Catalan',
|
||||
'locale' => 'ca_ES.UTF-8',
|
||||
],
|
||||
'zh' => [
|
||||
'name' => 'Chinese Simplified',
|
||||
'locale' => 'zh_CN.UTF-8',
|
||||
],
|
||||
'hr' => [
|
||||
'name' => 'Croatian',
|
||||
'locale' => 'hr_HR.UTF-8',
|
||||
],
|
||||
'cs' => [
|
||||
'name' => 'Czech',
|
||||
'locale' => 'cs_CZ.UTF-8',
|
||||
],
|
||||
'da' => [
|
||||
'name' => 'Danish',
|
||||
'locale' => 'da_DK.UTF-8',
|
||||
],
|
||||
'nl' => [
|
||||
'name' => 'Dutch',
|
||||
'locale' => 'nl_NL.UTF-8',
|
||||
],
|
||||
'en' => [
|
||||
'name' => 'English',
|
||||
'locale' => 'en_US.UTF-8',
|
||||
'encoding' => 'UTF-8',
|
||||
],
|
||||
'et' => [
|
||||
'name' => 'Estonian',
|
||||
'locale' => 'et_EE.UTF-8',
|
||||
],
|
||||
'fi' => [
|
||||
'name' => 'Finnish',
|
||||
'locale' => 'fi_FI.UTF-8',
|
||||
],
|
||||
'fr' => [
|
||||
'name' => 'French',
|
||||
'locale' => 'fr_FR.UTF-8',
|
||||
],
|
||||
'ka' => [
|
||||
'name' => 'Georgian',
|
||||
'locale' => 'ka_GE.UTF-8',
|
||||
],
|
||||
'de' => [
|
||||
'name' => 'German',
|
||||
'locale' => 'de_DE.UTF-8',
|
||||
],
|
||||
'el' => [
|
||||
'name' => 'Greek',
|
||||
'locale' => 'el_GR.UTF-8',
|
||||
],
|
||||
'he' => [
|
||||
'name' => 'Hebrew',
|
||||
'locale' => 'he_IL.UTF-8',
|
||||
],
|
||||
'hi' => [
|
||||
'name' => 'Hindi',
|
||||
'locale' => 'hi_IN.UTF-8',
|
||||
],
|
||||
'hu' => [
|
||||
'name' => 'Hungarian',
|
||||
'locale' => 'hu_HU.UTF-8',
|
||||
],
|
||||
'id' => [
|
||||
'name' => 'Indonesian',
|
||||
'locale' => 'id_ID.UTF-8',
|
||||
],
|
||||
'it' => [
|
||||
'name' => 'Italian',
|
||||
'locale' => 'it_IT.UTF-8',
|
||||
],
|
||||
'ja' => [
|
||||
'name' => 'Japanese',
|
||||
'locale' => 'ja_JP.UTF-8',
|
||||
],
|
||||
'kk' => [
|
||||
'name' => 'Kazakh',
|
||||
'locale' => 'kk_KZ.UTF-8',
|
||||
],
|
||||
'ko' => [
|
||||
'name' => 'Korean',
|
||||
'locale' => 'ko_KR.UTF-8',
|
||||
],
|
||||
'lv' => [
|
||||
'name' => 'Latvian',
|
||||
'locale' => 'lv_LV.UTF-8',
|
||||
],
|
||||
'lt' => [
|
||||
'name' => 'Lithuanian',
|
||||
'locale' => 'lt_LT.UTF-8',
|
||||
],
|
||||
'no' => [
|
||||
'name' => 'Norwegian',
|
||||
'locale' => 'nn_NO.UTF-8',
|
||||
],
|
||||
'pl' => [
|
||||
'name' => 'Polish',
|
||||
'locale' => 'pl_PL.UTF-8',
|
||||
],
|
||||
'pt' => [
|
||||
'name' => 'Portuguese',
|
||||
'locale' => 'pt_PT.UTF-8',
|
||||
],
|
||||
'ro' => [
|
||||
'name' => 'Romanian',
|
||||
'locale' => 'ro_RO.UTF-8',
|
||||
],
|
||||
'ru' => [
|
||||
'name' => 'Russian',
|
||||
'locale' => 'ru_RU.UTF-8',
|
||||
],
|
||||
'sr' => [
|
||||
'name' => 'Serbian',
|
||||
'locale' => 'sr_CS.UTF-8',
|
||||
],
|
||||
'sk' => [
|
||||
'name' => 'Slovak',
|
||||
'locale' => 'sk_SK.UTF-8',
|
||||
],
|
||||
'sl' => [
|
||||
'name' => 'Slovenian',
|
||||
'locale' => 'sl_SI.UTF-8',
|
||||
],
|
||||
'es' => [
|
||||
'name' => 'Spanish',
|
||||
'locale' => 'es_ES.UTF-8',
|
||||
],
|
||||
'sv' => [
|
||||
'name' => 'Swedish',
|
||||
'locale' => 'sv_SE.UTF-8',
|
||||
],
|
||||
'tg' => [
|
||||
'name' => 'Tajik',
|
||||
'locale' => 'tg_TJ.UTF-8',
|
||||
],
|
||||
'th' => [
|
||||
'name' => 'Thai',
|
||||
'locale' => 'th_TH.UTF-8',
|
||||
],
|
||||
'tr' => [
|
||||
'name' => 'Turkish',
|
||||
'locale' => 'tr_TR.UTF-8',
|
||||
],
|
||||
'uk' => [
|
||||
'name' => 'Ukrainian',
|
||||
'locale' => 'uk_UA.UTF-8',
|
||||
],
|
||||
'uz' => [
|
||||
'name' => 'Uzbek',
|
||||
'locale' => 'uz_UZ.UTF-8',
|
||||
],
|
||||
'vi' => [
|
||||
'name' => 'Vietnamese',
|
||||
'locale' => 'vi_VN.UTF-8',
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
@ -125,8 +125,7 @@ $template->assign_vars(array(
|
|||
// The following assigns all _common_ variables that may be used at any point in a template
|
||||
$template->assign_vars(array(
|
||||
'SIMPLE_HEADER' => !empty($gen_simple_header),
|
||||
'CONTENT_ENCODING' => isset($bb_cfg['lang'][$userdata['user_lang']]['encoding']) ?
|
||||
$bb_cfg['lang'][$userdata['user_lang']]['encoding'] : 'utf-8',
|
||||
'CONTENT_ENCODING' => $bb_cfg['charset'],
|
||||
|
||||
'IN_ADMIN' => defined('IN_ADMIN'),
|
||||
'USER_HIDE_CAT' => (BB_SCRIPT == 'index'),
|
||||
|
|
|
@ -193,7 +193,7 @@ class Emailer
|
|||
|
||||
/** Set some variables */
|
||||
$this->subject = !empty($this->subject) ? $this->subject : $lang['EMAILER_SUBJECT']['EMPTY'];
|
||||
$this->encoding = $bb_cfg['lang'][$userdata['user_lang']]['encoding'];
|
||||
$this->encoding = $bb_cfg['charset'];
|
||||
|
||||
/** Prepare message */
|
||||
if ($bb_cfg['emailer']['smtp']['enabled']) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue