WebFaction
Community site: login faq

I'm trying to set the default and only shop language of a Satchmo 0.9.2 installationto Dutch.

I'm following the instructions on translating content:

From the directory /home/myusername/webapps/myshop/lib/python2.7/Satchmo-0.9.2-py2.7.egg I issued the following command to compile the Dutch langauge files:

find . -name locale -exec sh -c 'cd $0 && cd ../ && python2.7 
/home/myusername/webapps/myshop/lib/python2.7/django/bin/django-admin.py 
makemessages -l nl -e html,txt,rml' {} \;

I can now see multiple .../locale/nl/LC_MESSAGES/django.po files wich contain messagestrings translated into Dutch.

My local_settings.py file has a LOCALE_PATHS variable defined:

LOCALE_PATHS = ""

I have compiled the .po files to .mo files with:

find . -name locale -exec sh -c 'cd $0 && cd ../ && python2.7
/home/myusername/webapps/myshop/lib/python2.7/django/bin/django-admin.py 
compilemessages' {} \;

I only want text to appear in Dutch, so my local_settings.py only contains:

LANGUAGE_CODE = 'nl'
LANGUAGES = (
    ('nl', "Nederlands"),
)

Users should not be ablo to choose other translations, so allow_translation_choice is set to False in settings.py:

L10N_SETTINGS = {
  'currency_formats' : {
     'EURO' : {'symbol': u'€', 'positive' : u"€%(val)0.2f", 'negative':
u"€(%(val)0.2f)",
               'decimal' : ','},
  },
  'default_currency' : 'EURO',
  'show_admin_translations': True,
  'allow_translation_choice': False,
}

and in the same file I have enabled my i18n urls:

SATCHMO_SETTINGS = {
    'SHOP_BASE' : '',
    'MULTISHOP' : False,
    'SHOP_URLS' : patterns('', (r'^i18n/', include('l10n.urls')),)
}

To make sure that my templates use the correct language code, I also have in settings.py:

TEMPLATE_CONTEXT_PROCESSORS = (
    'satchmo_store.shop.context_processors.settings',
    'django.core.context_processors.auth',
    'django.core.context_processors.i18n',
)

After jumping through all these hoops, my shop language still shows up in English and still has the 'Change language' with an empty drop-down button in the lower right corner.

Anyone have a clue where I went wrong?

Thanks in advance.

asked 04 Mar '11, 00:01

BioGeek
336
accept rate: 0%

Hi,

Did you restart your Apache server after making these changes? If not, try that as you have made changes to the .py files. You might try running: find . -name '*.pyc' -print0|xargs -0 rm to remove the find .pyc files.

(04 Mar '11, 02:24) klynton
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×909
×337
×7

question asked: 04 Mar '11, 00:01

question was seen: 2,755 times

last updated: 04 Mar '11, 02:24

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM