Setting default language

522 views
Skip to first unread message

orsomannaro

unread,
Mar 5, 2012, 11:09:18 AM3/5/12
to mayan...@googlegroups.com
I'm trying Mayan but I'm new in Python/Django: is it possibile to set a
default language different from English?


Thank you so much for sharing your work!

Roberto Rosario

unread,
Mar 5, 2012, 11:57:35 AM3/5/12
to mayan...@googlegroups.com
Sure, create a settings_local.py file with the following content:

LANGUAGE_CODE = 'es'

MIDDLEWARE_CLASSES = (
    'common.middleware.strip_spaces_widdleware.SpacelessMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'common.middleware.login_required_middleware.LoginRequiredMiddleware',
    'permissions.middleware.permission_denied_middleware.PermissionDeniedMiddleware',
    'pagination.middleware.PaginationMiddleware',
)

The MIDDLEWARE_CLASSES is the same as in the default settings.py file but without the 'django.middleware.locale.LocaleMiddleware' to keep the language on the one set by the LANGUAGE_CODE setting.

change the 'es' in LANGUAGE_CODE setting to any of the supported language codes:

'es' - 'Spanish'
'pt' - 'Portuguese'
'ru'- 'Russian'
'it' - 'Italian'
'pl' - Polish

Thanks for supporting my work :)

orsomannaro

unread,
Mar 6, 2012, 8:36:34 AM3/6/12
to mayan...@googlegroups.com
Il 05/03/2012 17:57, Roberto Rosario ha scritto:
> Sure, create a settings_local.py file with the following content:

Perfect!

> Thanks for supporting my work :)

For sure If I use Mayan in my project I want it may enjoy good health.. ;)


I have a doubt: there is some API that I can use or the user that login
in my application must also login a second time and work directly in Mayan?

Roberto Rosario Gonzalez

unread,
Mar 6, 2012, 9:41:46 AM3/6/12
to mayan...@googlegroups.com
There is an API but it is still in Alpha stage and not really usable, and a 'portal' feature is also planned for the next development version so that administrators can embed Mayan in a frame or such inside other software like Wordpress, etc.

Roberto Rosario Gonzalez

unread,
Mar 6, 2012, 9:42:25 AM3/6/12
to mayan...@googlegroups.com
So at the moment no, but I'm hoping to change that soon.

orsomannaro

unread,
Mar 6, 2012, 10:02:57 AM3/6/12
to mayan...@googlegroups.com
Il 06/03/2012 15:42, Roberto Rosario Gonzalez ha scritto:

> So at the moment no, but I'm hoping to change that soon.


Ok. If I decide to include Mayan I my application I hope we can discuss
a software bounty..

Reply all
Reply to author
Forward
Message has been deleted
0 new messages