[Phpmyadmin-devel] Using gettext?

Marc Delisle marc at infomarc.info
Thu Jun 11 09:46:43 CEST 2009


Michal Čihař a écrit :
> 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.

Have you tried the implementation of gettext in PHP (not the extension)? 
Latest version seems to be 1.0.7 dating more than 3 years ago.

Marc




More information about the Developers mailing list