[Phpmyadmin-devel] localization

Marc Delisle Marc.Delisle at cegepsherbrooke.qc.ca
Tue Sep 11 22:41:47 CEST 2007


Sebastian Mendel a écrit :
> Hi,
> 
> i know we discussed this already - but i will bring it up again
> 
> currently any string needs to be in the locale files, even original english
> 
> this makes it harder for external developers with own plugins - whether they
> completely ignore our string files or they need to put their strings into
> our locale files
> 
> i think it would be nice to have a function for this - like many other project
> 
> i would suggest something like:
> 
> _('query executed successfully');
> 
> 
>  - at least an english message is always displayed, even if not defined in
> locale files
> 
>  - we could better handle placeholders, escaping,
> 
> 
> _('query %1 executed successfully', $array_strings, 'html');
> _('query {1} executed successfully', $array_strings, 'js');
> _('query {{1}} executed successfully', $array_strings, 'plain');
> 
> we could split up language files into different parts - no need to always
> load all lang strings
> 
> we do not need to put english messages in foreign lang files if not translated
> 
> we could easily apply filters if required
> 
> $str* does not pollute global name space
> 
> ...
> 

Sebastian,
please give an example of the new calling sequence in this snippet:

if (PMA_PHP_INT_VERSION < 50200) {
     echo '<div class="warning">' . sprintf($strUpgrade, 'PHP', '5.2.0') 
. '</div>' . "\n";
}

and the equivalent German message in the splitted file.

Marc




More information about the Developers mailing list