[Phpmyadmin-devel] Using gettext?

Michal Čihař michal at cihar.com
Thu Jun 11 09:24:46 CEST 2009


Hi

Dne Thu, 11 Jun 2009 03:20:41 -0400
Marc Delisle <marc at infomarc.info> napsal(a):

> Michal Čihař a écrit :
> > Hi
> > 
> > Dne Tue, 09 Jun 2009 08:38:22 -0400
> > Marc Delisle <marc at infomarc.info> napsal(a):
> > 
> >> Would this have an impact on performance, for example? 
> > 
> > Nothing measurable as far as I know.
> > 
> >> And what about 
> >> you wrote previously:
> >> ----------
> >> [*] I'd really prefer to migrate to gettext based solution for
> >> phpMyAdmin, but this seems unlikely, mostly because gettext as
> >> integrated in PHP is quite painful. Once you load translation, it is
> >> kept opened and any changes in the file lead to segfault and any
> >> replacing of the file is deleted. So the only way to make it see
> >> updated translation is to restart PHP (or Apache if you use mod_php).
> > 
> > Yes, that's why I do not propose to use gettext extension in PHP.
> 
> I feel that this was discussed before, but anyway... can you give an 
> example of what would happen with code like this:
> 
> zero_rows=<?php echo urlencode(sprintf($strFieldHasBeenDropped, 
> htmlspecialchars($row['Field']))); ?>"

sprintf(_('File %s has been dropped.'), htmlspecialchars($row['Field']))

> Also, I guess that there would no longer be source message files in the 
> download kit?

It can be, but it does not have to be.

-- 
	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: 197 bytes
Desc: not available
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20090611/df07d2af/attachment.sig>


More information about the Developers mailing list