4images Forum & Community
4images Modifications / Modifikationen => Language Packs => Topic started by: memphis on April 01, 2010, 03:19:28 PM
-
Hi,
Japanese Language Files.
Version 1.7.7
Regards,
memphis
*以下は日本語です。
文字コードはUTF-8で作成しています。
4images 1.7.7.zip を解凍後に、添付ファイルを解凍して上書きして下さい。
-
... thanks for sharing ...
-
Hello.
I found that word_wrap didn't work well when I used Multibyte Character like Japanese language.
The correction method is as follows.
To fix this:
in includes/functions.php
find:
function format_text($text, $html = 0, $word_wrap = 0, $bbcode = 0, $bbcode_img = 0) {
if ($word_wrap && $text != "") {
$text = preg_replace("/([^\n\r ?&\.\/<>\"\\-]{".$word_wrap."})/i", " \\1\n", $text);
}
Replace with:
function format_text($text, $html = 0, $word_wrap = 0, $bbcode = 0, $bbcode_img = 0) {
if ($word_wrap && $text != "") {
$text = mb_ereg_replace("/([^\n\r ?&\.\/<>\"\\-]{".$word_wrap."})/i", " \\1\n", $text);
}
*以下は日本語です。
日本語などマルチバイトを使う環境は、word_wrap が正しく動作しないことが解かりました。
修正方法は以下の通りです。
修正するファイル:
includes/functions.php の3行目です。
function format_text($text, $html = 0, $word_wrap = 0, $bbcode = 0, $bbcode_img = 0) {
if ($word_wrap && $text != "") {
$text = mb_ereg_replace("/([^\n\r ?&\.\/<>\"\\-]{".$word_wrap."})/i", " \\1\n", $text);
}
-
Thank you!
-
Additional.
To fix this:
in admin/comments.php
Find line 26:
define('IN_CP', 1);
define('ROOT_PATH', './../');
require('admin_global.php');
Replace with:
define('IN_CP', 1);
define('ROOT_PATH', './../');
require('admin_global.php');
mb_internal_encoding("UTF-8");
Around line 306:
if (strlen($comment_row['comment_text']) > 75) {
$comment_row['comment_text'] = substr($comment_row['comment_text'], 0, 75)."...";
}
Replace with:
if (mb_strlen($comment_row['comment_text']) > 75) {
$comment_row['comment_text'] = mb_substr($comment_row['comment_text'], 0, 75)."...";
}