Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


How to force a translation? - Odoo 8

Alejandro Perez Cosio
on 2/12/15, 5:44 PM 586 views


Is there a way to force a translation? 

I have a user with english as default language, but I want to force a french translation.

Is there a way to do this? _('fr', 'somethig to translate')

I could see that it's not possible to set the self.env.lang property from a method, so any help would be welcome..

Thank you in advance

I wanted to make comment but site is not allowing me to make comment. Because this is not an answer please convert it as comment. May I know why do you want to translate to French for an English user?

on 2/12/15, 6:59 PM


| 5 4 7
Lodz, Poland

On 2/12/15, 6:26 PM

Language propagate with context, see - self.env.context or self._context, for example:

self.env.context = {'lang': 'en_US', 'default_state': 'open', 'uid': 1, 'active_model': 'res.partner'}

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


Asked: 2/12/15, 5:44 PM
Seen: 586 times
Last updated: 3/16/15, 8:10 AM