发新话题
打印

关于Mambo v4.6无法使用其他语言包的非官方解决

关于Mambo v4.6无法使用其他语言包的非官方解决

在官方论坛已经有人提供了快捷的修改方法:


the next procedure do work the new language engine for Mambo , use it under your own risk

You just must do the next modifications:

File mamboroot/index.php
===========================
Aprox. in the line 129 appear :

$gettext->textdomain($lang);
#$gettext =& phpgettext(); dump($gettext);

Must be :

$gettext->textdomain($lang);

//Inicio Agregado Andres Felipe Vargas 15/10/2006 info_at_misucursalvirtual_dot_com
$component = substr(mosGetParam($_REQUEST, 'option', 'com_content'),4);
$gettext->add("common");
$gettext->add("frontend");
$gettext->add($component);
if ($adminside) {
$gettext->add("administrator");
}
//Fin Agregado Andres Felipe Vargas 115/10/2006 info_at_misucursalvirtual_dot_com

#$gettext =& phpgettext(); dump($gettext);

File mamboroot/includes/phpgettext/phpgettext.class.php
================================================== ========
Aprox. in the line 328 after load function:

add:

//Inicio Agregado Andres Felipe Vargas 15/10/2006 info_at_misucursalvirtual_dot_com
function add($domain) {
$catalog = new PHPGettext_catalog($domain, $this->text_domains[$this->domain]["path"]);
$catalog->setproperty('mode', _MODE_MO_);
$catalog->setproperty('lang', $this->lang);
$catalog->load();
foreach ($catalog->strings as $string)
$this->messages[$this->domain][$string->msgid] = $string->msgstr;
}
//Fin Agregado Andres Felipe Vargas 15/10/2006 info_at_misucursalvirtual_dot_com

Notes:
=========
- the "Use Gettext" option must be "No" in the mambo configuration
- this work for me in Mambo 4.6 SP1, attacched the two files modified.

TOP

发新话题