Inkscape: Translating your SVG documents
So now that I’ve made a few books using inkscape, where each page is an SVG file and I have my script that can create a bound pdf which each page in order. Now I’d like to be able to generate a translation template, upload it to launchpad and get the community involved in translation.
But just how do you go about doing that with SVG?
Well SVG supports multinational text internally so what ever tools you use should be mindful of SVG files specifically, not just to xml files.
We can generate a pot file (Translation Template) by using xml2po like so:
xml2po –output=translations.pot *-*.svg
And that may be enough to gather together translations for our media through tools such as launchpad translation services. But getting the translations back into the svg files… that may not yet be possible with the current set of tools.
In SVG to do multi-language text translations, what you would do if you were editing by hand, is wrap each of the text elements in a switch element and then duplicate the text element for each of the languages, making sure to add a systemLanguage attribute to each text element. See the SVG specification here.
Once you can safely generate the svg files with all your translations, then you could load up each translation in inkscape using `LANG=foo inkscape file.svg` and reposition each of the text entries for that language as required. This allows each language to have it’s own position information and so fit better in the context of a graphic.
Andy is a venerable expert in inkscape with a past interest in doing translations. But even his guide only suggested using the po files to generate many svgs instead of just the few. I wonder if this is because the problem is too hard to crack with simple existing tools and a bit of perl or python xml foo?
Any ideas folks?
have you tried asking on the svg-developers mailing list yet?
How many times, for the catalan trasllation?
Thanks