Jump to content

Topic on Project:Support desk

Internationalization: how do I change the language of an SVG file

2
JmCor (talkcontribs)

I am working on File:Saccheri quads.svg.

I would like the words "right", "obtuse", "acute" to appear in any language.

I know this is possible (possibly within limits) by editing the .svg file with a text editor (and saving with a mention of the language in the file name).

However is there a way to pass the three literals as parameters, provided they are not hard-coded in the .svg file? When requesting File:Saccheri quads.svg the Italian Wikipedia would pass "retto, "ottuso", "acuto", the French Wikipedia would pass "droit", "obtus", "aigu" and so on. Thank you.

~~~~

Ciencia Al Poder (talkcontribs)

Apparently, SVG provides a way to provide texts in multiple languages. There's a lang= parameter you can use on the image so it renders texts embedded inside a switch element in that language.

Example:

[[File:Multilingual SVG example.svg|thumb|180px|Multilingual SVG example|lang=en]]

[[File:Multilingual SVG example.svg|thumb|180px|Multilingual SVG example|lang=de]]

(note: this example works at least on wikipedia, but doesn't work on flow pages, not sure why)

Reply to "Internationalization: how do I change the language of an SVG file"