The description is no longer translated after editing a line

A proposal for an English-speaking customer comes out in English, then switches back to the original language as soon as a line is edited. The cause: the rich text editor and a description on several lines. Three ways out.

Versions concerned
Dolibarr 20 to 24.0.1 · reproduced in 23.0.4 and 24.0.1 · fixed in the 24.0.2 code (not yet announced on 4 October 2026)
What was checked
Tested on 4 October 2026 on a 24.0.1 instance, through the proposal screens: customer in English, rich text editor enabled, two translated products; after changing the price, only the line whose description spans several lines switches back to French. Fix tested by placing the official 24.0.2 file (core/lib/pdf.lib.php) on the 24.0.1; MAIN_MULTILANG_TRANSLATE_EVEN_IF_MODIFIED constant and re-saving the product card tested. Earlier reproduction on 23.0.4 (September). Line translation code (pdf_getlinedesc) compared in the official code from 20.0.4 to 24.0.2, in the 22.0, 23.0, 24.0 and development branches.

You make a proposal for a customer whose language is English. Your products have an English translation. The first PDF is perfect: everything is in English. Then you change the price of a line, you regenerate the PDF, and the description of that line comes back in French. Its label, however, stays in English.

It is not a configuration mistake on your part.

What happens

The translation is not saved on the line. It is applied when the PDF is generated, and only if the text of the line is still identical to the description on the product card. If it differs, Dolibarr considers that you customised it by hand, and leaves it as it is.

The problem comes from the rich text (WYSIWYG) editor for lines. It needs three conditions:

  1. the rich text editor is enabled for lines;
  2. the description on the product card is plain text, for example because it was entered before the editor was enabled, or imported;
  3. this description spans several lines.

When you open the line with the editor and save it, even just to change the price, its line breaks become <br> tags. The two texts are no longer identical, and Dolibarr stops translating. A description on a single line is not affected.

The label is not touched by the editor: it stays translated. Hence the half-translated PDF.

The solutions

  1. Dolibarr’s fix. It is in the 24.0.2 code: Dolibarr there compares the text of both descriptions ignoring HTML tags. On 4 October 2026, 24.0.2 can be downloaded from SourceForge since 2 October, but it is not yet announced on dolibarr.org and there is no Docker image yet. Once upgraded, regenerating the PDF is enough: the translation happens at generation. The fix is also in the 23.0 branch, but in no published 23.0.x version.
  2. Put the product description in HTML too. Open the product card and save it, with the rich text editor enabled, without changing anything: its description moves to the same format as the line, and the PDF is translated again. It is the solution without an upgrade, but it is done product by product.
  3. Enable MAIN_MULTILANG_TRANSLATE_EVEN_IF_MODIFIED (value 1, in HomeSetupOther Setup). The PDF then always uses the product translation. Be careful: it also replaces the descriptions you deliberately completed on a line, without warning.

How this was verified

  • On a 24.0.1 test instance: customer in English, rich text editor enabled, two translated products, one with a description on one line, the other on two lines. First PDF in English. After a price change through the screen, the two-line description switches back to French; the other stays in English.
  • Fixed 24.0.2 file placed on this instance, PDF regenerated: everything is in English. Same result with the constant of solution 3, and by re-saving the product card (solution 2).
  • With the constant, a line completed by hand (“… Delivery included.”) comes out in English without its addition.
  • The same problem had been reproduced in September on a 23.0.4. In the official code, the strict comparison is the same from 20.0.4 to 24.0.1; the fix (no. 40405) is in 24.0.2.

If your multilingual documents are still wrong

If your PDFs still mix languages, or if you have many products to go through, the €90 diagnosis is about looking at your case with you for one hour, then giving you in writing the cause and what the fix would cost.

See also

Dolibarrmultilingualtranslationproduct descriptionPDFWYSIWYG editor