If you manage different languages for your WHMCS site, it may happen that the same "static" page for different languages is quite different - both in contents, both in pagination.
I.e: the "About Us" page may be completely different, because the English version will be directed to the international market, while the Italian version will be specific for Italian market (also with images and media referred to Italy), the Spanish for the Spanish market, and so on...
In this case, instead of using WHMCS language variables, you can set up in WHMCS completely different pages, with different names, and then redirect the user from one to the other evaluating the language set in WHMCS.
To do so:
- create two different .php files (i.e. mypage.php and myitalianpage.php), and two correspondings.tpl files (i.e. mypage.tpl and myitalianpage.tpl)
- in the "international" page mypage.php, just after the $ca = new WHMCS_ClientArea(); statement, insert following code:
$language=Lang::trans('locale');
if ($language == 'it_IT') {
header("location: myitalianpage.php");
}
- while in the Italian page myitalianpage.php you'll need to add following code:
$language=Lang::trans('locale');
if ($language != 'it_IT') {
header("location: mypage.php");
}