Automatically add the language category to translated SVG files or after translating file (Community Wishlist/W528)

Currently, translated SVG files are often/usually missing in categories like c:Category:Spanish-language SVG diagrams. Instead of having volunteers spend lots of time and the categorization and the categories (useful for filtering, usage scans, search results ranking, translation efforts, etc), please have them automatically categorized dynamically based on the available SVG translations. Please
- add the SVG language category/ies for the languages SVG files were translated into (the language is known because it has to be set when translating a SVG file – see 2 in the image) and/or
- make the SVG Translate tool – which is used for nearly all SVG translations on Commons – add the respective language category the file was just translated to (just doing this would not fix the many SVG files missing the language categories – incl. many files just in just being in c:Category:Multilingual SVG – or having incomplete lang cats)
The SVG language categories are in c:Category:SVG files by language.
- Why this is useful
Otherwise, the categories will be incomplete which also means people searching for images in some language using a language category won't find it, it may impact the search results, and people looking at the file looking for a variant to use, e.g. for some other language Wikipedia, won't see it. There are more problems. It also wastes contributors time to have to add these things manually and means these cats are pretty unreliable.
This could be used if there is better language support on Commons where for example search results are adjusted based on the user's configured language or based on what language they searched in in a Web search engine before they landed on the Commons page.
Categories allow people to better find files of a given language etc. This can be useful for displaying people the most relevant results in Web search engine and Commons search results as well as for translating files in use on a Wikipedia or planned to be used there into the language etc.
- Technical implementation
Ideally, the method would check the existing categories of the file and then set the right subcat(s) of c:Category:SVG by language such as c:Category:Chinese-language SVG diagrams based on the cats the file already has such as c:Category:Spanish-language SVG diagrams.
Categories for subtitles in other language are added to video files with the c:Template:Closed captions so this works quite similar to what's proposed here.
Maybe a bot could also add these cats afterwards or add a cat to files with incomplete language-cats or e.g. add sth like {{SVGTranslated}} that auto-sets the SVG language cats via template like {{Closed captions}} does (here not the caveat of the subcategories like c:Category:SVG diagrams by language).
An additional advantage of having a template for SVG files with translations could be that then the language categories could be hidden so the categories aren't as cluttered and just a few nonhidden ones about the subject because the language categories are also linked to from the template.
As explained earlier, just changing the SVG Translate tool would not fix many files where a or multiple lang cat(s) are missing. Thus, if that tool is changed to add the category or a template after translation other SVG files that have been translated with the tool or have translation should be changed via some bot/script. That script could check whether there is a language category matching each of the translated versions' language (each version except the original+default language have the language specified as you can see in the image at 2).
- Current state / problems
The many languages shouldn't and realistically can't all be set manually by users. See for example how many translations this diagram has: c:File:Digestive system diagram en.svg. These shouldn't need to be added by hand with edits like this or this and doing so would be unnecessary inefficient time-sink.
As an example, a user uploaded a new translated version of c:File:Celltypes.svg but did not add the cat for the language it was translated into and didn't add the new variant to the other versions gallery on the file page (this is another thing that could be done here but for now let's keep this about the lang cats). From my experience on Commons, it's far more often the case that SVG translators do not add the respective language category to the file than when they do. Nearly always when I saw on my Watchlist that a translated version has been uploaded I just added the lang cat and the translator didn't bother adding the cat or didn't know these categories exist. This also means that many files have some lang cats set but do not have the lang cats for the newer translations (thus incomplete lang cats).
Unassigned
Commons users
- Created: 20:45, 22 March 2026
- Last updated: 13:46, 8 October 2026
- Author: Prototyperspective (talk)
This wish currently has 2 supporters. Voting for this wish is open until it is completed.