Python and i18n

  • Thread starter =?ISO-8859-1?Q?Jo=E3o?= Alfredo
  • Start date
?

=?ISO-8859-1?Q?Jo=E3o?= Alfredo

Hi people.

My LANG environment variable is set to pt_BR.UTF-8 and when I run a
date command:

$ date
Sáb Out 18 11:19:42 BRT 2003
I get the current date in the appropriate locale.

Now when i run the following command in the python interpreter:

$ python
Python 2.2.2 (#1, Feb 24 2003, 19:13:11)
[GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.i get the date in US locale format.

Does python support the pt_BR locale?? Am I doing something wrong??

Thanks in advance!
 
G

Guest

My LANG environment variable is set to pt_BR.UTF-8 and when I run a
date command: ....
Does python support the pt_BR locale?? Am I doing something wrong??

import time, locale
locale.setlocale(locale.LC_ALL, "")
print time.strftime("%c")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,076
Latest member
OrderKetoBeez

Latest Threads

Top