-->
Welcome, Guest
Username: Password: Remember me
You can also tweak your setup of Dolibarr by setting hidden configurations found in Dolibarr Setup Other

TOPIC: .ODT Function {__ (XXX) __} does not work

.ODT Function {__ (XXX) __} does not work 9 months 2 days ago #34550

  • Paji
  • Paji's Avatar
  • OFFLINE
  • Newcomer
  • Posts: 12
  • Karma: 0
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 ?

DOLIBARR ENVIRONMENT
- Version: [7.0.0]
- Operating System: [Linux CentOS 7]
- Web Server: [Apache 2.4.6]
- PHP: [7.0.26]
- Database: [MySQL 5.7.22]
Last Edit: 9 months 2 days ago by Paji.
The administrator has disabled public write access.

.ODT Function {__ (XXX) __} does not work 9 months 2 days ago #34551

  • aljawaid
  • aljawaid's Avatar
  • OFFLINE
  • Moderator
  • Learning to be open, one source at a time.
  • Posts: 726
  • Thank you received: 116
  • Karma: 13
Hello

Thanks for posting. You have posted your issue in the How to / Help section.

Kindly post (here) your Dolibarr setup environment as suggested in https://www.dolibarr.org/forum/2-this-forum/28209-post-guidelines. This will greatly help the community in assisting you where possible.
The administrator has disabled public write access.

.ODT Function {__ (XXX) __} does not work 9 months 8 hours ago #34565

  • yves57
  • yves57's Avatar
  • OFFLINE
  • Expert
  • Posts: 101
  • Thank you received: 25
  • Karma: 4
Hello,
Did you try with a other translation key in standard lang file?
The administrator has disabled public write access.

.ODT Function {__ (XXX) __} does not work 8 months 4 weeks ago #34603

  • Paji
  • Paji's Avatar
  • OFFLINE
  • Newcomer
  • Posts: 12
  • Karma: 0
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.
The administrator has disabled public write access.

.ODT Function {__ (XXX) __} does not work 7 months 3 weeks ago #35056

  • Paji
  • Paji's Avatar
  • OFFLINE
  • Newcomer
  • Posts: 12
  • Karma: 0
Anyone can help me?
The administrator has disabled public write access.

.ODT Function {__ (XXX) __} does not work 7 months 3 weeks ago #35057

  • ksar
  • ksar's Avatar
  • OFFLINE
  • Moderator
  • Posts: 256
  • Thank you received: 69
  • Karma: 10
Hi,

Please copie past all the thing you have done and we will may be able to help
The administrator has disabled public write access.

.ODT Function {__ (XXX) __} does not work 7 months 2 weeks ago #35084

  • Paji
  • Paji's Avatar
  • OFFLINE
  • Newcomer
  • Posts: 12
  • Karma: 0
EDIT:
langs/en_US/propal.lang - add test=test translation

documents/doctemplates/proposals/template.ods - add {__(test)__}



Generating a document. The translation should be displayed(test translation), and is displayed {__(test)__}

Where do I make mistakes?
Last Edit: 7 months 2 weeks ago by Paji.
The administrator has disabled public write access.

.ODT Function {__ (XXX) __} does not work 6 months 3 weeks ago #35333

  • Paji
  • Paji's Avatar
  • OFFLINE
  • Newcomer
  • Posts: 12
  • Karma: 0
I have described my problem well? Can anyone help me?
The administrator has disabled public write access.

.ODT Function {__ (XXX) __} does not work 6 months 2 weeks ago #35372

  • Paji
  • Paji's Avatar
  • OFFLINE
  • Newcomer
  • Posts: 12
  • Karma: 0
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");

langs/en_US/propal.lang - add test=test translation
documents/doctemplates/proposals/template.ods - add {__(test)__}

The language does not work when the document is generated.
Only the default language works
Attachments:
Last Edit: 6 months 2 weeks ago by Paji.
The administrator has disabled public write access.

.ODT Function {__ (XXX) __} does not work 6 months 2 weeks ago #35375

  • ksar
  • ksar's Avatar
  • OFFLINE
  • Moderator
  • Posts: 256
  • Thank you received: 69
  • Karma: 10
Hello,

If you modify propal.lang, you should include $langs->load("propal");
The administrator has disabled public write access.

.ODT Function {__ (XXX) __} does not work 6 months 2 weeks ago #35382

  • Paji
  • Paji's Avatar
  • OFFLINE
  • Newcomer
  • Posts: 12
  • Karma: 0
I've included in the doc_generic_proposal_odt.modules file
$ langs-> load ("propal");

And further in the generated template it does not display my translation.

In Attachment: pictures what I change
Attachments:
The administrator has disabled public write access.

.ODT Function {__ (XXX) __} does not work 5 months 2 weeks ago #35679

  • Paji
  • Paji's Avatar
  • OFFLINE
  • Newcomer
  • Posts: 12
  • Karma: 0
help ?
The administrator has disabled public write access.

Translation of product label does not work 5 months 1 week ago #35697

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.
The administrator has disabled public write access.

.ODT Function {__ (XXX) __} does not work 4 months 3 weeks ago #35898

  • Paji
  • Paji's Avatar
  • OFFLINE
  • Newcomer
  • Posts: 12
  • Karma: 0
It took half a year. And no one in this forum wants to help you solve the problem. I'm refreshing the post.
The administrator has disabled public write access.
Time to create page: 0.139 seconds