Apr
22

整理自:http://www.joomlagate.com/content/view/32/2/
1、下载 Joomla 1.0.11 英文版安装包,最好是 zip 格式;

2、安装一个 FTP 工具(如 FlashFXP 3.4 中文版);

3、上传安装包到网站根目录并解压。如果没有解压权限可以请求管理员帮你解压。否则只能在本地解压后上传;
(这里我就用DreamHost的One-click Installs了)

4、不要开始安装!(这里我吃过好几次亏,一定在注意)先从中文版Joomla 1.0.11 版本中提取3个中文前台汉化文件

simplified_chinese.php
simplified_chinese.ignore.php
simplified_chinese.xml

这三个文件位于 /language 目录下面。

打开 simplified_chinese.php 文件并设置编码为 utf-8 。方法:

查找

 

  1.

2.
/** templates/*.php */
3.
DEFINE(’_ISO’,'charset=UTF-8′);
4.
DEFINE(’_DATE_FORMAT’,'Y-m-d’); //Uses PHP’s DATE Command Format - Depreciated /**
这个文件里已经修改好了的。
上传这三个文件到你网站的 /language 目录下面。
5、修改前台、后台模板,使其能够正确显示 utf-8 编码的中文。方法:
打开前台模板的 index.php 文件(位置 /templates/rhuk_solarflare_ii),找到

 

<meta http-equiv=”Content-Type” content=”text/html; <?php echo _ISO; ?>” />

这一行代码,修改为

 

<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />

并移动到紧跟 标签之后。

同样方法修改后台模板的 index.php 文件( 位置:/administrator/templates/joomla_admin/ )。

提醒:如果网站开通后下次更换模板,不论是前台还是后台,都要在上传之后立即按上述方法修改代码,使其接受 utf-8 编码,然后才能启用该模板。否则所有内容变成乱码!
6、修改joomla.php文件(位置 /includes)的1018行左右。

 

  1.

2.
if (!$username || !$passwd) {
3.
echo “<script> alert (\”"._login_incomplete. “\”); ……
在 if 这行下面加:

 

header(’content-type:text/html; Charset=UTF-8′);

也可能在 function mosErrorAlert 这个函数里.

 

  1.

2.
function mosErrorAlert( $text, $action=’window.history.go(-1);’, $mode=1 ) {
3.
$text = nl2br( $text );
4.
$text = addslashes( $text );
5.
$text = strip_tags( $text );
6.

7.
switch ( $mode ) {
8.
case 2:
9.
header(’content-type:text/html; Charset=UTF-8′);
10.
echo “<script>$action</script> \n”;
11.
break;
12.

13.
case 1:
14.
default:
15.
header(’content-type:text/html; Charset=UTF-8′);
16.
echo “<script>alert(’$text’); $action</script> \n”;
7,在浏览器地址栏输入 http://www.yoursite.com (注意,这是举例,你需要替换为你自己的网站URL)即可看到安装画面,按照提示一步一步安装;安装完成后看看根目录下的 configuration.php 文件,如果不是 utf-8 编码,也要改成 utf-8 编码。然后进入后台开始安装其他组件。

Tags:

No Responses

Leave a Response

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>