[Phpmyadmin-devel] concatenate locales
    Michal Čihař 
    michal at cihar.com
       
    Thu Oct 18 07:35:07 CEST 2007
    
    
  
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
-- 
	Michal Čihař | http://cihar.com | http://blog.cihar.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20071018/8935692a/attachment.sig>
    
    
More information about the Developers
mailing list