PEAK XOOPS - Re: The Easiest Multi-Language Hack (EMLH) 1.25 in englishin japanese

Re: The Easiest Multi-Language Hack (EMLH) 1.25

Target Downloads
Subject The Easiest Multi-Language Hack (EMLH) 1.31
Summary == お手軽多言語ハック ==●特長気軽に利用できる多言語ハックです。ファイル1つをコピーして、mainfile.php に1行追加。たったそれだけで、動作します。obフィルターを利用して最終出力時にいくつかの変換処理を行うだけなので、XOOPSのブロックキャッシュやモジュ...

List posts in the topic

none Re: The Easiest Multi-Language Hack (EMLH) 1.25

msg# 1.2
depth:
1
Previous post - Next post | Parent - Children.1 | Posted on 2007/10/5 5:50
TheRplima  二等兵   Posts: 1
Hi,

I made some changes in this hack and i would like to share with you.

With this changes, the hack translate the system and module language too.

To do this only insert in the include/commom.php this code:

Quote:
if (isset( $_GET['easiestml_lang'] ) && isset($_COOKIE['easiestml_lang'])){
switch ($_GET['easiestml_lang']){
case 'pt':$xoopsConfig['language'] = 'portuguesebr'; break;
case 'us':$xoopsConfig['language'] = 'english'; break;
}
}elseif(isset($_COOKIE['easiestml_lang'])){
switch ($_COOKIE['easiestml_lang']){
case 'pt':$xoopsConfig['language'] = 'portuguesebr'; break;
case 'us':$xoopsConfig['language'] = 'english'; break;
}
}elseif(isset($_GET['easiestml_lang'])){
switch ($_GET['easiestml_lang']){
case 'pt':$xoopsConfig['language'] = 'portuguesebr'; break;
case 'us':$xoopsConfig['language'] = 'english'; break;
}
}

before this:
Quote:
// #################### Include site-wide lang file ##################
if ( file_exists(XOOPS_ROOT_PATH."/language/".$xoopsConfig['language']."/global.php") ) {
include_once XOOPS_ROOT_PATH."/language/".$xoopsConfig['language']."/global.php";
} else {
include_once XOOPS_ROOT_PATH."/language/english/global.php";
}

Sorry my poor english, if have questions, please contact me by pm here
Votes:18 Average:7.78

Posts tree

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!