0

I have this:

from datetime import datetime

    d = datetime.now()
    print d.strftime ("It is %A %d. %B %Y"

How to I set a language to give me a date? I want it for example is ES or DE.

  • 2
    see http://stackoverflow.com/a/985517/65387 or http://stackoverflow.com/a/956084/65387 – mpen Aug 28 '13 at 19:31
  • Change `It is` to `El es` for ES, I believe – inspectorG4dget Aug 28 '13 at 19:31
  • If the intro is too complex, you can do a variety of things. You can create a dictionary with languages mapping specific keys (language names) to values (the translations), or you can retrieve the translation of your welcome message with google translate. But the simples is what @Mark suggested to use pythons locale. –  Aug 28 '13 at 20:03

0 Answers0