dokuwiki-plugin-dw2pdf icon indicating copy to clipboard operation
dokuwiki-plugin-dw2pdf copied to clipboard

Translation of "Table of Contents"

Open ghost opened this issue 7 years ago • 3 comments

Hi! It is possible to translate "Table of Contents" on my language? Without hardcoding because in near future i want to add multilanguage content...

Thanks for support!

ghost avatar Feb 05 '18 14:02 ghost

I just stumbled across this, too. Actually it looks like this depends on the language selected for the user interface in Admin -> Configuration -> Interface language ("lang").

If I set the user interface to English, then in each exported PDF it reads "Table of contents", and when I set the interface language to German then "Inhaltsverzeichnis" appears in the PDF instead of "Table of contents".

We use DW mostly for a knowledge base for our support guys, so most pages are written in English, so we have the UI configured for English.

On the other hand, the support guys who just look up wiki articles, export them as PDFs and send them to customers would prefer the user interface language be set to German, since it's their native language, and there are also a couple of pages that are written in German.

So it would be good to decouple the TOC title from the user interface language, and let it deppend of the language used on the wiki page to be exported.

Is there a way to achieve this and mark individual pages as "written in English" or "written in German" so it would be possible to automatically use the appropriate language for the TOC title?

mburnicki avatar Feb 12 '18 13:02 mburnicki

This has some relation to #318, however that issue is about interface, and this about exported content.

At this point in the code the headers of the ToC are set. Indeed using general wiki language for the texts. https://github.com/splitbrain/dokuwiki-plugin-dw2pdf/blob/25ad3e40d1d70716dfb75e660c08f7028b81d95e/action.php#L469-L484

Klap-in avatar Feb 12 '18 14:02 Klap-in

Also related to #438

Klap-in avatar Oct 12 '22 21:10 Klap-in