Page 1 of 1
Localization how to??
Posted: Sun Jun 22, 2003 8:03 am
by fkeessen
Hi,
Hmm, how to use the localization modules (for example ivweather.lang.dutch.php)???
Thanks for helping me out
Regards,
Frank
Re: Localization how to??
Posted: Sun Jun 22, 2003 6:30 pm
by Giz
fkeessen wrote:Hi,
Hmm, how to use the localization modules (for example ivweather.lang.dutch.php)???
Thanks for helping me out
Regards,
Frank
Frank,
Make sure that any of the language files you want to use are in the same directory as the IVWeather.class.php file.
require("ivweather2.class.php");
Start your script with code similar to this:
[php]$ivw = new IVWeather($uvw);
if (!$ivw->err) {
if ($localized)
$ivw->loadLocalization($rlangwd, $rlangsky);
/* your code here */
}[/php]
[php]//When you want the Sky string use:
$ivw->getLocalSky('dutch')
//When you want the wind direction string use:
echo $ivw->getLocalWinddecode('dutch');[/php]
That's about it. Hope this helps.