Localization how to??

Discussion and questions about anything in the tech section, or any of the software or libraries I've released or have worked on.
Post Reply
fkeessen
Posts: 5
Joined: Thu Jun 19, 2003 11:37 pm
Location: The Netherlands

Localization how to??

Post by fkeessen »

Hi,

:oops: Hmm, how to use the localization modules (for example ivweather.lang.dutch.php)??? :oops:

Thanks for helping me out :wink:

Regards,

Frank
Giz
Site Admin
Posts: 57
Joined: Wed May 07, 2003 6:19 pm

Re: Localization how to??

Post by Giz »

fkeessen wrote:Hi,

:oops: Hmm, how to use the localization modules (for example ivweather.lang.dutch.php)??? :oops:

Thanks for helping me out :wink:

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.
Post Reply