User tests: Successful: Unsuccessful:
Ref #764
could we use SVG's for the flags instead of separate GIF's that cause 18 additional resource loads per page
Now this opened not one but several cans of worms for me...
The most easy solution (I found) would be going to https://www.flag-sprites.com generate the combined flag image plus the required CSS and go home.
Unfortunately the flags they offer do not contain some languages we currently use. Mainly catalan and british english. We may leave those blank or just choose a "nearby" one but - using an EU image flag for en-GB might get us in deepest trouble (who knows if they really go with the brexit), and I don't want to get killed for using the "wrong flag"...
So I bit the bullet (before it hits me)... and my first stop was here: http://www.phpied.com/command-line-css-spriting which gave me some ideas on how this could be achieved.
Another thing to consider was the language "code" to use.
Currently we are using "Joomla! language codes™". The only reference I found was at Micro$oft.
There are several other language codes including
There are also some PHP Libs dealing with language codes:
I decided not to use any of those but instead reinvent the wheel (again) - I love Joomla! you know - and added a list of known languages with "our" codes to the language helper class. See: https://github.com/joomla/jissues/pull/801/files#diff-fd55cb6560b16d21f62ec0d0898c7e17R43
This is the best and most complete flag images collection that I found and that is free of charge (as in 0$) available on the internet:
You really wont miss the Jolly Rogers collection including a flag icon for Calico Jack Rackham:
display
property) is correctjtracker make languageflags
. This command requires imagemagick to be installed on your system and the flag images to be stored "somewhere". To test this command you have to download the flag images from here as they are not included in this PR.JTracker
application using the montage command and store it at the path given by the --imagefile
option (defaults to /cache/flags.png
)--cssfile
option (defaults to /cache/flags.css
).Before | After |
---|---|
![]() |
![]() |
Yes this indeed helps a lot as the information I posted above is only the result of some hours of internet research performed today, so I may be very wrong in several points.
The first link you posted is a list of language codes that are used in the .NET Framework. Those codes do not follow any standard (I guess?), and - is this what we are using in Joomla!?
And then, I am not sure if I should use 中文(中华人民共和国) or 中文 (Zhōngwén) for Chinese, so I would leave the final decision to the native speakers (I can only cope with 3 languages)
The second link also was quite helpful as it states in the first line:
Holds locale data for all the locales we currently support
The script is pretty much the same as those at:
So, again, everybody seems to have to bake his/her own locale file for the languages, ISO-XXX codes, currencies, native names and whatnot that are "supported"...
Any further information on this topic would be highly appreciated.
Status | New | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-06-22 14:58:59 |
Closed_By | ⇒ | mbabker |
Anyone who wants to help fix our amazing CSS and layouts is welcome to do so. Otherwise, this works for me, so...
YES this did the trick - THANKS - and sorry for being so dumb ;(
You're not!!!
Happy if it works!
If it helps,
as reference, I also use
https://chronoplexsoftware.com/myfamilytree/localisation/languagecodes.htm
(interesting for native names)
and this one:
https://github.com/jlongster/php-product-details/blob/master/localeDetails.class.php