Re: Translation problems
Brought to you by:
iridium
From: Ondrej J. <ne...@po...> - 2002-05-21 15:24:42
|
Maxim, 17:10:11 21. maj 2002 (utorok) Greetings. > > =09I hope you understand where is problem. Slovak traslations of > > words ``hour'' and ``minute'' depends on used number. In others > > fields is situation similar. > > =09Should I override pw_text methods or other solution should be used? > Yes, exactly. You would simply copy the function print_pretty_time > From pw_text.php to pw_text_sk.php and then you would be able to > change how the time is formatted. > [... ...] =09And what about this solution: function print_pretty_wind($wind) { extract($wind); if (! empty($meters_per_second)) { if ($meters_per_second - floor($meters_per_second) > 0) { $this->strings['meters_per_second'] =3D ' metra za sekundu'; } elseif ($meters_per_second =3D=3D 1) { $this->strings['meters_per_second'] =3D ' meter za sekundu'; } elseif ($meters_per_second =3D=3D 2 || $meters_per_second =3D=3D 3 || $meters_per_second =3D=3D 4) { $this->strings['meters_per_second'] =3D ' metre za sekundu'; } } if (! empty($miles_per_hour)) { if ($miles_per_hour =3D=3D 1) { $this->strings['miles_per_hour'] =3D ' m=ED=B5a za hodinu'; } elseif ($miles_per_hour =3D=3D 2 || $miles_per_hour =3D=3D 3 || $miles_per_hour =3D=3D 4) { $this->strings['miles_per_hour'] =3D ' m=EDle za hodinu'; } } return parent::print_pretty_wind($wind); } =09I tried it and it works. May it be? I think that parent:: calls are=20 nothing undesirable. =09=3DNepto=3D ___________________________________________________________________________= _ Ondrej 'Nepto' Jombik, http://www.nepto.sk/ nepto@atomicpile.s= k |