Ask Your Question
1

How to turn off internationlization in askbot ?

asked 2012-03-03 20:51:07 -0500

Prafulla T gravatar image Prafulla T
21 1 1 3

In Settings.py, I read following.

  If you set this to False, Django will
 make some optimizations so as not     
 to load the internationalization
 machinery.                            
 USE_I18N = True LANGUAGE_CODE = 'en'

But when I turn it off, I hit assertion failure in startup_procedures.py

   'USE_I18N': {
        'value': True,
            'message': 'Please set USE_I18N = True and\n'
                'set the LANGUAGE_CODE parameter correctly'
    },

Is it some kinda of regression bug ? Is there any way I can turn off internalization ?

delete close flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2012-03-03 20:56:52 -0500

Evgeny gravatar image Evgeny flag of Chile
11009 50 84 182
http://askbot.org/

updated 2012-03-03 21:04:36 -0500

Yes, I've tried to disable i18n recently to speed up the default language version and failed, so there is no way to do it now.

We never aimed thus far to support turning off the internationalization facility, but we probably should, so I'll add this to our bug tracker.

Not sure how much of a speedup is expected... if anyone has an idea, please let us know.

link publish delete flag offensive edit

Comments

This used to work on old version. I see that turning it off decreases memory usage by around 20 MB. It is very useful on shared hosting env when you need only one language.

Prafulla T ( 2012-03-03 21:30:57 -0500 )edit

I see, do you notice any difference in speed? Also on what version this works for you, I've never attempted to track this down. Thanks.

Evgeny ( 2012-03-03 21:33:07 -0500 )edit
1

answered 2012-03-04 12:12:13 -0500

paulus_almighty gravatar image paulus_almighty flag of United Kingdom
239 3 4 14

Not an answer, just a FYI.

So when I turn off i18n and change startup_procedures.py to pass over the i18n test I get this:

File "/home/paulo/workspace/askbot-devel/askbot/skins/loaders.py", line 74, in set_language
trans = translation.trans_real.translation(language_code)
AttributeError: 'module' object has no attribute 'trans_real'

Which seems like it might be related to this closed djangoproject ticket:

"The solution is 1) not import things that use the translation framework from an app's __init__.py or 2) delay the import until after all apps have been imported."

link publish delete flag offensive edit

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Reliable Askbot Hosting

Create your Q&A site at askbot.com. Managed Askbot hosting at just $15/mo. Dedicated hosting, support contracts, consulting services.

create your Q&A site
30 days free trial

Question tools

Follow

subscribe to rss feed

Stats

Asked: 2012-03-03 20:51:07 -0500

Seen: 101 times

Last updated: Mar 04 '12