views:

21

answers:

1

Hi, Can i use an other langage instead of english(say, frensh) for default django translation. For example, instead for doing this:

messages.error(request, _('My message in english'))

I do this:

messages.error(request, _('Mon message en francais'))
+1  A: 

Yeah, you could do that, and it would mostly work, but better would be to write them in English and then provide French translations (via the standard i18n approach), and to set the project's LANGUAGE_CODE to 'fr' as well.

That way, your code will be more easily reusable in other languages, and - perhaps more usefully to you if you're not worried about that - you'll be able to cleanly use French/other language translations already available in any third-party apps you want to add to your site, else you'll be mixing what Django thinks is default English (but is French) and thinks is French (and is French)

Allez! ;o)

stevejalim