Frederico Leonardo
Frederico Leonardo

Reputation: 95

django-transmeta default language

I've been googling for this and can't seem to find an answer. I'm implementing django-transmeta in one of my projects for a multilingual website but would like it to use, as the default language, something other than the installation/admin language.

I have, in my setting.py:

LANGUAGE_CODE = 'en'

gettext = lambda s: s
LANGUAGES = (
    ('pt', gettext('Portugues')),
    ('es', gettext('Espanol')),
    ('en', gettext('English')),
)

Because I want Django's admin to be in English. But I want the default language, i.e., the required not null fields to be in Portuguese. So the default generated table fields would be something like name_pt instead of name_en, in order to force content managers to fill in the Portuguese fields, leaving all others as optional. Is this even possible? Has anyone had any experience with it? Any help will be much appreciated.

Upvotes: 2

Views: 339

Answers (1)

Frederico Leonardo
Frederico Leonardo

Reputation: 95

Found an answer on my own and will leave it here for reference.

Add this to your settings.py file:

TRANSMETA_DEFAULT_LANGUAGE = 'pt'

or whichever language code you want to be the default.

Upvotes: 3

Related Questions