Re: Translation problems
Brought to you by:
iridium
|
From: Martin G. <gim...@gi...> - 2002-05-20 18:57:27
|
Ondrej Jombik <ne...@po...> writes:
> Maxim, 19:37:40
> 20. maj 2002 (pondelok)
> Greetings.
>=20
> I recognize to make Slovak translation of phpWeather,
Great!
> but I have a few problems. It seems to be impossible to make proper
> translation of report only with existing translation array.
>=20
> One example for all. I want to say when report was made in Slovak=20
> language.
>=20
> Report bol urobeny 1 hodinu a 1 minutu dozadu.
> Report bol urobeny 2 hodiny a 2 minuty dozadu.
> Report bol urobeny 5 hodin a 5 minut dozadu.
> Report bol urobeny 22 hodin a 22 minut dozadu.
>=20
> I hope you understand where is problem. Slovak traslations of
> words ``hour'' and ``minute'' depends on used number. In others
> fields is situation similar.
>=20
> Should I override pw_text methods or other solution should be used?
Yes, exactly. You would simply copy the function print_pretty_time
From=20pw_text.php to pw_text_sk.php and then you would be able to
change how the time is formatted.
You would probably have to change the
$minutes =3D sprintf($this->strings['time_minutes'],
$this->properties['mark_begin'],
$minutes,
$this->properties['mark_end']);
into something like this:
if ($minutes =3D=3D 1) {
$minutes =3D sprintf('a %s1%s minutu dozadu',
$this->properties['mark_begin'],
$this->properties['mark_end']);
} elseif ($minutes =3D=3D 2) {
$minutes =3D sprintf('a %s2%s minuty dozadu',
$this->properties['mark_begin'],
$this->properties['mark_end']);
} else {
$minutes =3D sprintf('a %s%s%s minuty dozadu',
$this->properties['mark_begin'],
$minutes,
$this->properties['mark_end']);
}
The same goes for the hours.
=2D-=20
Martin Geisler My GnuPG Key: 0xF7F6B57B
See my homepage at http://www.gimpster.com/ for:
PHP Weather =3D> Shows the current weather on your webpage.
PHP Shell =3D> A telnet-connection (almost :-) in a PHP page.
|