This question has been flagged
2 Replies
10031 Views

I would like to know if I have a list of products in version 7 in a csv file with the translations there, how can I import the product names and their translation at once?

Avatar
Discard
Best Answer

I just accidentially found out another way to import product translations. I needed English and Finnish names and descriptions for the products, so here's what I did:

  1. Export the fields Name, Description of all products (external id is included by default)
  2. Translate the names and descriptions from Finnish to English in LibreOffice Calc
  3. Save the resulting table as a CSV (make sure the empty descriptions have quotes as well)
  4. Change the language of the Odoo Administrator to English
  5. Import the CSV to Odoo products

 

Avatar
Discard
Best Answer

The method below was supposted to work in the previous version:

Assuming the default language is different from Germen, for example english:

id,name,name:lang=de-DE,description,description:lang=de-DE

To import in english (without language definition) & german.

Does it work for v7?

Update 2013-03-31:

I ended up importing/appending to the ir_translation table directly. All other methods failed for me in V7. This is how I work now:

  • Installed PGAdmin to check tables, field names and item id's.
  • Installed OpenOffice Base for the import to the ir_translation table. Connect to the database with JDBC driver (actually depends on your version of OpenOffice, Postgresql etc. Google it.)
  • Installed OpenOffice Calc to create and edit csv-files.

  • Do one translation within OpenERP.

  • Check and copy the added records with PGAdmin, to see how it should be done.
  • Edit/create your csv file in Calc. Then copy all rows you want to import.
  • In Base right click(not open) the ir_translation table and select paste.
  • Select append, and do not import the "id" column (= auto-number).
  • Check the result with PGAdmin and in OpenERP.

Still hopefull there will be a real import module / possibility to make things easier...

Avatar
Discard

where did you see this method ? I have not see this method in docs

Here: http://forum.openerp.com/forum/topic22023.html

And here: http://forum.openerp.com/forum/topic24407.html

Tried also an other option given, to create a user, set a different language for that user and import the descriptions in that specific language. In my case the default language was EN, second DE. It did the trick vice versa. All original descriptions changed to DE, all translated were still EN. So does not work either, I think the only way to do this, is in the database itself .... Until someone comes up with a module for this.

I made by importing data to ir.translation table however we have problems with new product names. (System translates some of the fields automatically by mixing up :)

is this offical documentation ?

I also tried all different kind of import formats but none worked until now :( - Is there really no solution for such an elemental task?!?

So is my assumption right that csv import is useless for multilanguage fields in v7? - Should we write a bug report or is this just something for the wishlist?!? At least it feels like a bug if a user has selected german as his language and imports somthing only to recognize that only the english fields are updated and not as expected the german ones.

I also found out that if you creat a product by csv and then upadte the products name through the csv the same name will be taken for all languages even if a differen (old) language tag is available for german?!? Does not matter what the user language is?!?

I saw also strange behaviour when importing with different language settings, so I stopped with experimenting and used the method I described above. Better solution is a module to import different languages for products and other translatable fields.