неділя, 22 лютого 2026 р. 18:00:56 EET Maren Hachmann написано:
Hi Lucas,
the tutorials are written in XSLT, a markup language similar to HTML, which can be converted to multiple formats, among them SVG and HTML. This takes into account differing text lengths, adjusts line lengths and document size for different numbers of characters.
So that mechanism very likely is not the solution for you, if the SVG images already exist.
SVG provides a built-in mechanism of '<switch>' to be multilingual in a single file. If your translators can edit the SVG files themselves, they could use that. Or you could, of course. But this is cumbersome.
Because of different text length, usually manual editing is the way to go.
Or perhaps, if the texts are short, one-line things, or the layout allows for variable text length, something like NextGenerator and putting the translations in a CSV file could work, too: https://inkscape.org/~Moini/%E2%98%85nextgenerator-replace-export
If you find something else, let us know here, it's going to be interesting.
Hi,
po4a can be used to extract messages from SVG as an case of XML. For example (SVG in ./en),
#!/bin/bash
po4a-updatepo --format xml -o \ --master-charset UTF-8 --po tutorial.pot \ --msgid-bugs-address "example@ml.mylocale.org" --copyright-holder "My Team" \ --package-name "Tutorials" --package-version "6.0" \ $( for doc in en/*.svg; do echo --master $doc done )
Modern way is to use po4a.conf.
Just my 2 cents.
Bestrgerads, Yuri
Maren
Am 22.02.26 um 10:49 schrieb Lucas Vieites:
Hi there, I want to translate the text content of a bunch of SVG files. I
thought of using the same mechanism that we use for the Inkscape tutorials, but I can't find much information about how it works. The workflow I'm thinking of is:
- Extract the strings from the SVG into .po files
- Translate the .po files
- Put the translated strings back into the SVG files.
Can you help me work this out, please?
Thank you.
-- *Lucas Vieites https://namedrop.io/lucasvieites* lucasvieites.com https://lucasvieites.com/ LinkedIn https://www.linkedin.com/in/lucasvieites
Inkscape Translators mailing list -- inkscape-translator@lists.inkscape.org
To unsubscribe send an email to
inkscape-translator-leave@lists.inkscape.org