This has more to do with how you setup your python environment than with the localization/internationalization itself.
I suggest using virtualenv and virtualenvwrapper to easily setup your django environment. Using virtualenv is pretty much the standard amongst developers nowadays. You can use manage.py rather than django-admin.py, but you need to have the correct PYTHONPATH setup and xgettext installed. This is harder to do in windows than in linux, like most things in the django/python world. Please see http://docs.djangoproject.com/en/dev/topics/i18n/localization/#gettext-on-windowsfor instructions on how to setup gettext on windows. I must stress my recommendation that you use virtualenv. Don't forget to add the relevant paths to gettext or other utilities in virtualenv should you decide to use it. There's documentation on that around the web too. Sincerely, Andre Terra On Wed, Mar 23, 2011 at 1:03 PM, Andre Lopes <[email protected]> wrote: > Hi, > > I have reading some topics of > http://docs.djangoproject.com/en/1.3/topics/i18n/localization/ > > But have not understand what I need to do. > > First what I intend to do... > > I have created a new App, called "directorio", and now I need to have > the capability of translate the data inside some database columns. > > my models.py > > [quote] > from django.utils.translation import ugettext as _ > > GENDERS = (('male', _('MALE')), ('female', _('FEMALE'))) > > class Genders(models.Model): > n_gender = models.CharField(max_length= 60, choices= > GENDERS) > [/quote] > > After doing this I think I need to do the *.po an *.mo files inside my > App directory... I have tried to do: > > [quote] > django-admin.py makemessages -l pt > [/quote] > > But is not working, I got this error: > > [quote] > Traceback (most recent call last): > File "C:\Python27\Lib\site-packages\djan > odule> > from django.core import management > ImportError: No module named django.core > > C:\xampp\htdocs\djangodir\directorio>djang > Traceback (most recent call last): > File "C:\Python27\Lib\site-packages\djan > odule> > from django.core import management > ImportError: No module named django.core > [/quote] > > What I need to do to create the dir "locale\pt\LC_MESSAGES" and the > *.po and *.mo files for my App? > > Give me some clues, I'm kind of lost. > > Best Regards, > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

