5 Sep
2005
5 Sep
'05
10:17 p.m.
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