[Phpmyadmin-devel] concatenate locales
Marc Delisle
Marc.Delisle at cegepsherbrooke.qc.ca
Thu Oct 18 07:50:59 CEST 2007
Michal Čihař a écrit :
> Hi
>
> On Thu, 18 Oct 2007 07:17:56 +0200
> Sebastian Mendel <lists at sebastianmendel.de> wrote:
>
>> $strRowsDeleted = '%1$d rows deleted.';
>> $strRowDeleted = '1 row deleted.';
>>
>> $strRowsDeleted = '%1$d row(s) deleted.';
>>
>> i think i would prefer the last one
>
> How about using gettext support in PHP for localisation? I just
> migrated one my tiny project from similar system like phpMyAdmin uses
> to gettext one and it was quite easy [*].
>
> With gettext we can use ngettext calls, which are exactly designed for
> getting correct localized translation of these strings. This way we
> can get correct wording for all possibilities in different languages.
> For example in Czech correct would be something like this:
>
> Smazán 1 záznam.
> Smazány 2 záznamy.
> Smazány 3 záznamy.
> Smazány 4 záznamy.
> Smazáno 5 záznamů.
>
>
> [*] I hacked two simple python scripts to migrate code and translation
> data:
> http://viewsvn.cihar.com/viewvc.cgi/ukolovnik/trunk/admin/locales-convert?revision=108&view=markup&pathrev=132
> http://viewsvn.cihar.com/viewvc.cgi/ukolovnik/trunk/admin/locales-data-migrate?revision=109&view=markup&pathrev=132
Add another extension as a requirement?... I don't know :/
More information about the Developers
mailing list