1
DonCurioso
EMLH - System & others

Hi,

i follow all instructions to use EMLH, but it doesn´t translate system or modules. I´ve got all modules with english&spanish folders languages, but changes doesn´t happend...

I put this code as Rplima suggest over Gijoe´s page (replacing for code i´ll need it), but site goes crazy. All tags were showed & i was to did a new installation for it.

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

}elseif(isset(
$_COOKIE['easiestml_lang'])){ switch ($_COOKIE['easiestml_lang']){ case 'pt':$xoopsConfig['language'] = 'portuguese'; break; case 'us':$xoopsConfig['language'] = 'english'; break; } 

}elseif(isset(
$_GET['easiestml_lang'])){ switch ($_GET['easiestml_lang']){ case 'pt':$xoopsConfig['language'] = 'portuguese'; break; case 'us':$xoopsConfig['language'] = 'english'; break; } }


Any idea?

Thanks in advance.
HispaXoops | Xoops España

That's the way i like it! | Nada mejor que una Alhambra bien helada con aceitunas...

2
zyspec
Re: EMLH - System & others
  • 2009/3/23 13:14

  • zyspec

  • Module Developer

  • Posts: 1089

  • Since: 2004/9/21


I don't really know anything ablut the EMLH - System but the code above doesn't set the $xoopsConfig['language'] variable if neither the _COOKIE or _GET are set... I think you could simplify what you want to:

$xoopsConfig['language'] = 'english';   //sets the default language to english
if (isset( $_GET['easiestml_lang'] ) {
    switch (
$_GET['easiestml_lang']){ 
        case 
'pt':
            
$xoopsConfig['language'] = 'portuguese'
            break; 
    }  
}elseif (isset(
$_COOKIE['easiestml_lang'])){
    switch (
$_COOKIE['easiestml_lang']){ 
        case 
'pt':
            
$xoopsConfig['language'] = 'portuguese'
            break; 
    }
}


You could simplify the code even further if you don't plan to include any languages other than 'potruguesebr' and 'english'.

Login

Username:
Password:

Lost Password? Register now!

Who's Online

71 user(s) are online (41 user(s) are browsing Support Forums)


Members: 0


Guests: 71


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits