Skip to content

Commit fdc1ba2

Browse files
author
REH.TW《旋風之音》
committed
Update gettext setting
1 parent 8dc6af8 commit fdc1ba2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lang/setlang.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,16 @@
1818
setlocale(LC_ALL, 'en_US');
1919
} else if ('zh-tw' == $lang) {
2020
putenv('LANG=zh_TW');
21-
setlocale(LC_ALL, 'zh_TW'); // bsd use zh_TW.BIG5
22-
header('Content-type: text/html; charset=big5');
21+
setlocale(LC_ALL, 'zh_TW');
2322
} else if ('zh-cn' == $lang) {
2423
putenv('LANG=zh_CN');
25-
setlocale(LC_ALL, 'zh_CN'); // bsd use zh_CN.GBK
26-
header('Content-type: text/html; charset=gbk');
24+
setlocale(LC_ALL, 'zh_CN');
2725
}
2826

2927
define('PACKAGE', 'demo');
3028

3129
// gettext 設定
3230
bindtextdomain(PACKAGE, 'lang'); // or $your_path/lang, ex: /var/www/test/lang
3331
textdomain(PACKAGE);
32+
bind_textdomain_codeset (PACKAGE, "utf-8");
3433
?>

0 commit comments

Comments
 (0)