Lỗi tiếng Việt Joomla
1. Do database- Bạn cần kiểm tra MySQL (tối thiểu: 4.1.x)
- Khi tạo database cần chọn "MySQL connection collation": utf8_general_ci
(https://image.vietnetwork.vn/uploads/VietNetwork.Vn11271.jpg)
2. Do file index.php trong thư mục templates- Bạn cần vào file \templates\{your_template}\index.php và tìm xem có dòng sau chưa:
<meta https-equiv="Content-Type" content="text/html; charset=utf-8" />Phải chắc là có charset=utf-8, nếu là ISO_xxx hãy đổi lại thành utf-8
- Nếu đã có dòng
<meta https-equiv="Content-Type" content="text/html;<?php echo _ISO; ?>" />Thì phải chắc chắn rằng dòng định nghĩa biến ISO trong file ngôn ngữ language\vietnamese.php phải là
DEFINE('_ISO','charset=utf-8');3. Do file templates_css.css trong thư mục templates- Kiểm tra chỗ khai báo font-family xem có phải là các font UNICODE hay không. VD:
font-family: Arial, Helvetica, sans-serif;
font-family: "Times New Roman", Times, serif;
font-family: "Courier New", Courier, monospace;
font-family: Verdana, Arial, Helvetica, sans-serif;4. Do các module/component- Tìm dòng sau trong các file *.php *.xml
<meta https-equiv="Content-Type" content="text/html; charset=iso-8859-1"Thay bằng:
<meta https-equiv="Content-Type" content="text/html; charset=utf-8"Cách này hơi mất công so với cách dùng file php.ini nhưng chắc ăn (vì tôi đã dùng thử file php.ini nhưng chưa được).
5. Do file ngôn ngữ languages\xxxxx.php- Kiểm tra dòng định nghĩa _ISO
/** templates/*.php */
DEFINE('_ISO','charset=utf-8'); /* Line 403 trong file english.php */