Open roddc opened 2 years ago
Not yet. Haven't looked into this.
Something you'd like to pick up?
This would also be useful to me, and have interest in implementing it
What is the use case exactly?
You could just define an environment value to set the language, and create a loop in bash to build the docs in different languages?
I would rather not need to go that route and like the convenience that i18n gives me. Setting that up for the multiple projects I'm documenting. I'm more than willing to work on the feature as I really enjoy your implementation for non translated projects. If you could just point me in the general direction?
Ok cool.
So i18n adds links to translated pages to the top of every page.
The way this plugin works is that it 'collects' the pages. And it seems only the main language is picked up.
My approach would be to first inspect the docs/ folder, and see what the file structure is that i18n uses. Probably something with original filename and the language.
Then I would see if you can access the i18n plugin config in the final plugin event of print plugin. I've done this in the table-reader plugin before. Breakpoints are great for this, and you can explore the config yourself.
The idea would be to construct not 1, but multiple collections of files, and create multiple print pages (with the right language suffix). And then we add some links to the HTML print page
The last step would be to hide the i18n links when printing the HTML page (or exporting to PDF). You can do this using CSS, see the other elements where we do the same.
Not easy if this is your first mkdocs plugin contribution.. but feel free to dive in!
I am using
mkdocs-static-i18n
to generate multi-language pages, butmkdocs-print-site-plugin
only generates the default language for print-page.Is there a option I can use to generate other languages?