Closed (outdated)
Project:
Language Icons
Version:
7.x-1.x-dev
Component:
Icon collection
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
16 Nov 2011 at 13:36 UTC
Updated:
13 Jan 2026 at 14:35 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
loominade commentedthere is actually a javascript based method to add a fallback:
Comment #2
Freso commentedThis is actually quite an interesting prospect. This would also make it possible to "jack" almost all the flags straight from Wikipedia, without having to run them through my string of commands to make them PNG files first.
It's not going to make it into 7.x-1.x though, but for a future 7.x-2.x, it might be a possibility. I'll postpone it for now. Thank you for the suggestion though!
Comment #3
Freso commentedHaving had this in the back of my mind for a few days, it turns out I actually really, really like the idea.
Is there any way, you know of, to load .png per default and switch to .svg if it's supported? Problem is, browsers that do not render SVGs are likely to not run JavaScript either. (I'm having e.g. "links -g" in mind.)
Comment #4
loominade commentedI'm afraid there is no way to create a fallback or polyfill without javascript
Comment #5
Freso commentedI think you may have misunderstood me. I wanted to use SVG as the "fallback", defaulting to PNG. If the browsers runs JavaScript and otherwise supports SVG images, then load the SVG instead of the PNG. Am I making sense or just on a late night ramble? :)
Comment #6
matroskeenJust because svg it's cool :)
Tested on the latest release of Drupal 7 and 7.x-1.1 language icons branch.
Comment #8
matroskeenLittle fix to make PHP 5.3 happy.
Comment #10
matroskeenMore fixes to make PHP 5.3 happy.
Comment #12
matroskeenlol :) let's remove this test at all :)
Comment #14
matroskeenPHP 5.3 <3
Comment #15
thomas.frobieterLets close this, since D7 is deprecated. Here is the newer issue: https://www.drupal.org/project/languageicons/issues/2819739
Comment #16
thomas.frobieter