In the template .odt I tried to add a translation (for the propal module)
In lang, I added a translation in propal.lang
In the propal template I entered {__ (translation key) __}
What am I doing wrong ?
Thanks for posting. You have posted your issue in the How to / Help section.
Kindly post (here) your Dolibarr setup environment as suggested in [url]www.dolibarr.org/t/post-guidelines/16873/1 This will greatly help the community in assisting you where possible.
langs/en_GB/propal.lang here, ta adds a new translation. in the template, enter {__ (XXX) __} instead of xxx - enter the translation key.
In pdf, this option of changing translations by language works. I only have a problem with odt.
I want to set up a 2 language skill in the .ods template.
If you choose, for example, Polish, the text will be displayed in Polish.
And if I choose English, the text in English will be displayed.
Type of text: Buyer, description, etc.
In create on ODT - I read that you have to write
{__ (XXX) } = Translated value of a translation key. XXX - Note: Translation must be loaded with $ langs-> load (“languagefile”)
{ [XXX] __} = Value of constant XXX
doc_generic_proposal_odt.modules - this is in this file $langs->load(“main”);
Hi
Unfortunately I encounter the same problem. In the odt file, {line_product_label} is not translated and stays in the original language while {line_desc} is perfectly translated. Can anyone help with this matter? Or do I misunderstand the ODT function described in this thread?
Thanks a lot for your help.
If you have some problems to translate {__(XXX)__} into your ODT template, it is necessary to verify the format of the string because your ODT file can contain some tags to define the style of text.
If you unzip the ODT file, you can see in the content.xml that the string can be exploded like this: {__(</text:span><text:span text:style-name=“T14”>gme_name</text:span><text:span text:style-name=“T7”>)__}
Then, it will be not possible to translate correctly the string as the dictionnary contains a key like __(gme_name)__.
So, it is important when you type your key into the ODT file to copy/paste without any style (the simple option is to paste the key into notepad and then copy/paste into the ODT file to be sure that all styles are removed)