Using multilangual tagging in the 'custom text field

Using multilangual tagging in the 'custom text field

by Melissa Tommarello -
Number of replies: 2

Does anyone know if you can use multilingual tagging in the 'custom text' field?  I was hoping that language code you can use in core Moodle would work, but it doesn't. e.g. <span lang="en" class="multilang">Replace with English version</span>

Any suggestions? Thanks

Average of ratings: -
In reply to Melissa Tommarello

Re: Using multilangual tagging in the 'custom text field

by Jean-Michel Védrine -

Hello Melissa,

Unfortunately I don't have any suggestion, but I can explain why it doesn't work.

The custom text field is not used to output a web page, it is used to create a pdf document and unfortunately the pdf library used to create the pdf document (TCPDF library) doesn't support Moodle multilang tagging.

So it is not impossible to do but would require some work because what is needed is to add some code in the certificate.php file to process the content of the custom text field and extract the right content for the lang used before calling the function to print it on the pdf document.

As you see not easy to do, and to do the job a developper needs a good understanding of how multilangual tagging works in Moodle (unfortunately I don't have this knowledge).

In reply to Jean-Michel Védrine

Re: Using multilangual tagging in the 'custom text field

by Melissa Tommarello -

Hi Jean-Michel

That is very helpful.  Thanks for explaining how it works. smile  I think for the moment we will have to avoid the custom text field then when we know that certificate needs to be multilingual.

Best wishes

Melissa