Author: claus.colloseus
Description:
SVG images like the one given above can contain language-specific elements like labels via the <switch>-element. librsvg is able to handle them by simply reading the enviroment variable (See function rsvg_eval_switch_attributes in rsvg-cond.c)
This means it is possible to produce language-specific PNGs by invoking like this:
env LANG=<locale> rsvg -w<width> file.svg <width>px-<locale>-file.png
I tried this out at home, and it worked just fine.
Shoudn't it be possible to decide from the language of the page asking for the png which language version is needed and produce them accordingly? Or, to avoid the production of millions of identical images from single-language SVGs, what about a parameter for the Image: tag?
General comment:
For the moment, this is still a niche idea. It is yet not easy to produce SVGs that utilize these features. Inkscape even supresses the tags in its current version: https://bugs.launchpad.net/bugs/269390
But for the future, it would be feasable to introduce a toolserver gadget like http://toolserver.org/~nikola/svgtranslate.php
Maybe I'll do it myself. It depends on whether I get a thumbs-up here.
Version: unspecified
Severity: enhancement
URL: http://commons.wikimedia.org/wiki/Image:P-n_junction.svg
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=58920