Hi
On Thu, 18 Oct 2007 07:17:56 +0200
Sebastian Mendel <lists(a)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?r…
http://viewsvn.cihar.com/viewvc.cgi/ukolovnik/trunk/admin/locales-data-migr…
Add another extension as a requirement?... I don't know :/