On Mon, 2005-09-05 at 12:07, Antoine Pitrou wrote:

> Uh, what about internationalization (i18n) ?
> In i18n you can't avoid the need for parameterized strings.
> For example I want to write :
>       _("The file '%s' is read only") % filename
> not :
>       _("The file") + " '" + filename + "' " + _("is read only")
> 
> because the splitting in the second form will not translate correctly
> into other languages. You *have* to supply the whole non-splitted
> sentence to the translators.

Actually, this was part of the motivation behind PEP 292 and Template
strings, because what you really want is named parameters, not
positional parameters:

'The file $filename in directory $dir is read only'

There are a few techniques for getting full i18n for Template strings.

-Barry


Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to