[Japanese][English]というようなリンクをテーマ内につくりたいのですけど、その場合はjapaneseとEnglishの部分にhrefをつけて、?easiestml_lang=jaとリンク先を指定すればいいということでしょうか?
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
hi TheRplima.
There are many such modifications since 2 year ago.
eg) nobunobu's version.
EMLH Extension
http://www.kowa.org/modules/pukiwiki/354.htmlor sysUtils
http://www.kowa.org/modules/pukiwiki/359.htmlBut I never apply such a modification, because it disables XOOPS cache system.
The most characteristic of EMLH is "cache friendly".
nobuさん、こんにちは。
Quote:
easiestml_lang の引数/クッキーが未定義の場合の動作ですが、1.30 では次の順になっています。
* _SERVER['HTTP_ACCEPT_CHARSET']
* _SERVER['HTTP_ACCEPT_LANGUAGE']
文字コードから言語を導くより、言語の指定を優先した方が確実となので、これは逆にしていただけるとありがたいです。
確かにそうですね。
というわけで、アーカイブの方は修正しておきました。
ただこれ、あくまでHackであって、モジュールと違い、デフォルト状態を変更しても各サイトに反映されるのは難しいと思います。
cubeUtilsあたりだと意味あるかもしれませんね。
hi serial-weber.
Quote:
How to use EMLH with translation of system message?
Translation?
Do you mean auto-translation in web system?
It's an obviously irrelevant issue about EMLH.