prtksxna / svgtranslate-prototype

Prototype for SVG Translate tool
https://prtksxna.github.io/svgtranslate-prototype/
0 stars 0 forks source link

Figure out a way to deal with default languages when they are unknown (and need to be edited) #19

Open prtksxna opened 6 years ago

samwilson commented 6 years ago

Is it possible to get the default language from the metadata? I mean, obviously it wouldn't be in all SVGs, but is that the appropriate place to look? e.g. Inkscape sets it like this if you set a language in the file properties:

<metadata>
  <rdf:RDF>
    <dc:language>en</dc:language>
  <rdf:RDF>
</metadata>
prtksxna commented 6 years ago

That is a good idea, yeah!

I was also thinking that there might be some clues on the Commons file page, but don't know enough about that.

samwilson commented 6 years ago

I think for some template types (like map and book) it might be possible, but for the generic information template I'm not sure. The Commons API tool doesn't seem to extract language e.g. https://tools.wmflabs.org/magnus-toolserver/commonsapi.php?image=Charpente_d%27un_toit.svg&meta (which might just be because it's not wanted, but might be because it's difficult to do).