Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged

We have a website in Odoo 17 that has two languages: Dutch and French 


I use uploads to upload the information in the different languages. Such as the name of the product, the description, and the "Description for the website". 

This works fine for the name and description, but not for the "Description for the website". This is a HTML text that I upload. Everytime I upload one language, this language replaces the other language. 


eg. I upload the "Description for the website" in French, now also the texts on the dutch website have been replaced by the french text. 

Is there a way I can use the upload to also upload translations / different languages for HTML elements such as the "Description for the website"? 

Avatar
Opusti

Is there any update to this in 18? I'm dealing with the same issue.


Best Answer

To import translations of 'content', i.e. the ecommerce description of a Product (but pretty much any other information, given the field is ready for multiple languages) you can do this:

  1. Create or import your products in your 'core' language, for example by using a CSV or XLSX file as you would do normally.
    A highly simplified (but working one) looks like this:

    id

    name

    description_ecommerce


    my english product name

    my <b>english</b> <u>html</u> ecommerce description

    Once you have your products in place,

  2. Enable the Developer mode (debug mode): https://www.odoo.com/documentation/18.0/applications/general/developer_mode.html

  3. Go to Settings -> Translations -> Import/Export --> Export Translations and select
    • Language: The new language you want to import data for
    • File Format: it's up to you, a 'CSV File' is probably at hand already, however, tools such as Poedit (https://poedit.net/) can simplify your translations efforts (if you want to go with that one, you want to choose 'PO File')
    • Export Type: Model (NOT Module)
    • Model to Export: Product (but works for other stuff as well)
    • Model Domain: keep unchanged if you don't want to restrict the export (and subsequent import) to a limited set of data (products)
      in the wizard window:


  4. Click Export and then (after a short while, depending on the number of records that are exported) click the download file link labeled as [you_language_key].csv (or .po):

    For CSV Files specifically it's worth mentioning that the file is an actual CSV file (not what MS Excel believes, a CSV file is supposed to be). That being said please make sure you just don't open the file by double clicking it... If you don't know how to deal with CSV files in Excel - use a different tool such as Libre Calc from LibreOffice (https://libreoffice.org/download/download/) or read for example this: https://www.fcc.gov/general/opening-csv-file-excel (all this is yet another reason why you may consider downloading a PO file and using Poedit)

  5. Once the CSV is correctly opened, you will find seven columns, where column E ('src') and F ('value') are the most important. E holds the original value, F holds the translated value (or is empty, in case no translation has been set yet):

    Go ahead and add your translations to the file, then save it as a CSV (comma(!)-separated)

  6. Finally, got back to Odoo (close the 'Export Complete' wizard if you haven't already 🤡), navigate to Settings -> Translations -> Import/Export --> Import Translations:
    • Language Name: [the name of the language] (i.e. German)
    • Code: [the Locale Code of the language] (i.e. de_DE) - see Settings -> Translations -> Languages for the correct Locale Code
    • File: well, your CSV file
    • Overwrite Existing Terms: Active by default but depends on your needs (hover the question mark for details on it)
      and hit Import:


Once done, you can verify the result in the Product's form:

Avatar
Opusti
Best Answer

Hi Nicole,

I am experiencing the exact same issue with Odoo 17. I have a website with multiple languages (French and Arabic), and I am using uploads to import product details like names, descriptions, and "Description for the website" in different languages. However, like you, I face the problem that when I upload the description in one language (e.g., French), it overwrites the description in the other language (e.g., Arabic), even though the languages are set up correctly.

Has anyone found a solution to prevent the text in one language from replacing the text in another language when uploading HTML descriptions? I would really appreciate any advice or guidance on how to properly handle this in Odoo.

Thanks in advance for any help!

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
1
jun. 23
2630
1
okt. 23
44
1
dec. 22
6736
0
nov. 21
2215
0
okt. 15
4752