On Dec 4, 2019, at 06:02, Anders Munch <a...@flonidan.dk> wrote: > > Victor Stinner [mailto:vstin...@python.org] wrote: >> You may want to have a look at the deferred PEP 501 -- General purpose >> string interpolation: >> https://www.python.org/dev/peps/pep-0501/ > > I'm struggling to see what i-strings would do for i18n that str.format > doesn't do better.
str.format() really isn’t enough to do proper i18n; it’s actually a fairly complex topic. GNU Mailman 2 was one of the first big Python applications to be fully internationalized, with active translators, web pages that could be displayed in multiple languages, and email messages that could have different parts translated to different languages. I wrote or co-wrote several tools that work together to provide a full i18n solution. This is not just a technical problem, but a social one as well, since you have to understand that human translators are often not programmers. Take a look at these, especially the latter PyPI package: gettext - https://docs.python.org/3/library/gettext.html pygettext - (although now standard xgettext can grok Python) string.Template - https://docs.python.org/3/library/string.html#template-strings flufl.i18n - https://flufli18n.readthedocs.io/en/latest/ I’m not convinced that PEP 501 would provide much benefit on the technical side. Cheers, -Barry
signature.asc
Description: Message signed with OpenPGP
_______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/LI56JQCWE46POUDQKB5CZJPRHYOQ53N6/ Code of Conduct: http://python.org/psf/codeofconduct/