Odoo Help


Unable to import translation unless the locale code matches an existing locale code

Ray Carnes
on 2/25/13, 1:46 PM 2,998 views

Is loading a translation for a language with a new locale code supported?

I am able to export, modify and import a new language translation (via CSV) and see a new language (res.lang) record created.

When I change the language of a user to this new language, OpenERP gives me blank pages until my session times out.

If I import using an existing locale code, it works as expected.

I also tested this on build 4532 on runbot.


Cyril Gaspard (GEM)

--Cyril Gaspard (GEM)--

| 5 6 8
Paris, France
--Cyril Gaspard (GEM)--

Forum contributor since 2008

Cyril Gaspard (GEM)
On 3/16/13, 8:23 PM

Hi Ray,

when I see this bloglinked after, I remember your problem, hoping this will work and solve your problme :

OpenERP 7 : How to load a language from a module

Preloading a language translation in a customer module is as simple as writing a few lines of XML. The technique is to simulate the use of the language wizard below, that can be found in the settings → Translations → Load a translation menu:

Now if you want to automate this language installation during a customer module installation, you have to remember that a wizard is just an objet managed by a TransientModel, exactly like any other model. The first step is to create the object with a record:

<record model="base.language.install" id="install_tr">
 <field name="lang">tr_TR</field>
 <field name="state">done</field>
 <field name="overwrite" eval="1"/>

Since OpenERP 6.1 this kind of transient objects are created in the database so that the wizard is stateless and can be handled by any OpenERP server backend (in a multi-server configuration). Then they are automatically deleted after 30 min by a scheduled action.

Creating this object is not enough to load the language, as the wizard does not do anything until you click on the "Load" button.

So the next step is to simulate the click on the "Load" button. This can easily be done by a <function> tag pointing to the wizard object :

eval="[[ref('install_tr')]]" />

It means : run the "lang_install" function of the existing "base.language.install" transient object, and pass a list of arguments to it, containing the ids of this same object.

The final result is a simple lang.xml file containing :

<?xml version='1.0' encoding='UTF-8'?>

<openerp> <data noupdate="1">

<record model="base.language.install" id="install_tr">
    <field name="lang">tr_TR</field>
    <field name="state">done</field>
    <field name="overwrite" eval="1"/>


</data> </openerp>



Laura Jarvenpaa
On 7/22/13, 6:33 AM

Hmm, we had the same problem when using the stable 7.0 version. When we downloaded saas-1 version from launchpad and used that one importing csv-files with custom locale code worked fine. We didn't test method GEM suggested so don't know if that works. Just thought you could be interested to know that this blank page issue appears only when importing csv language files on stable 7 downloaded from nightly folder not in e.g saas-1 version (and I would assume that it won't appear on trunk version either) downloaded from launchpad.


Ray Carnes

--Ray Carnes--
| 9 7 9
Keyport, United States
--Ray Carnes--

Senior ERP Analyst

OpenERP 6.1, 7.0; Odoo 8.0, 9.0, 10.0 and 11.0.

Completed Odoo Functional and Technical Training.

Functional Areas:

  • CRM/Sales

  • Inventory

  • Manufacturing

  • Accounting

  • Purchasing

Major Skills:

  • Business Process Reengineering

  • Efficiency Consulting

  • User Needs and GAP Analysis;

  • Functional and Technical Design;

  • Prototyping and Proof of Concepts;

  • Requirements Specifications;

  • Agile Implementation;

  • Data Migration;

  • Configuration & Customization (UI and code);

  • Integration - Odoo and non Odoo Applications and Services;

  • Training and Knowledge Transfer;

  • Go Live Support;

  • Helpdesk;

  • Version Upgrades and Migration.

  • Accounting Expert.

I have over 20 years of experience empowering and enabling users with enterprise information systems that make a real and measurable difference in their ability to proactively manage their businesses and organizations. 

I am a skilled Communicator and I only take the serious things seriously!

Ray Carnes
On 3/24/13, 4:41 PM

I will try this and let you know.

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 2/25/13, 1:46 PM
Seen: 2998 times
Last updated: 3/16/15, 8:10 AM