Qt/FSUI: Add language flag icons to settings and setup
Description of Changes
Added country flag icons to the language selection dropdown in the Qt UI settings. Each language option now displays its corresponding flag icon to the left of the language name.
EDIT: Updated all the GameDB flags to these new flags too
(SVGs came from this repository https://github.com/lipis/flag-icons/tree/main/flags/4x3 which has an MIT license)
Rationale behind Changes
Flag icons make it easier to identify languages in the dropdown, especially for users familiar with flags. The "System Language [Default]" option now shows the flag corresponding to the user's actual system language.
Suggested Testing Steps
- Open Settings -> Interface and check the Language dropdown each language should show its flag icon
- Check that "System Language [Default]" displays the correct flag for your system locale
- Test the setup wizard language selection page flags should appear there as well
- Make sure that special cases: "Español (Hispanoamérica)" shows Mexico flag, Serbian shows Serbia flag
Did you use AI to help find, test, or implement this issue or feature?
No.
(~~Will push later today~~ (I didn't end up pushing later that day 😭) still need to figure out what flag to use for the Scandinavian countries i could just use the old flag which isn’t that big of a deal for me but in that regard just wanted to see what everyone wanted)
Can you find some common place to put getSystemLanguageCode() instead of having two copies of it in different files.
yup I’ll do that later today
I must've stopped reviewing after I noticed the first duplication. It's the same issue with
getFlagIconForLanguage()Is there a rationale as to why it's copy pasted in two different files instead of having one common function?
No I did not have a rationale why I did it that way but I have just fixed it right now for you
putting it as ready for review since I fixed all of your suggestions
but flags arent languages, they are countries? this is actually really bad design, i mean WHY isnt english the UK flag then? see this makes no sense xD, this just causes hidden problems in the long term
I GET THIS LOOKS PRETTY BUT EHHH, this is silly, i dont think this is a good change, on the moment it MIGHT seem okay but, in the long term, u need to come up with all kinds of silly reasons and this is just maintenance burden, u will start silly fights over specific flags or specific countries and, nah just keep it text only, i think this is a bad idea in the long term
just to make my point as to WHY this is wrong in every way, technically these are all "English"
🏴 🇬🇧 🇺🇸 🏴
ALL OF THESE ARE WRONG
hey which one is french here?? mh???
🇫🇷 🇨🇦
is there a CANADA language??? NO, THATS STUPID
but flags arent languages, they are countries?
People associate flags to languages that's the point it's been used in software for the last 30 years.
but flags arent languages, they are countries?
People associate flags to languages that's the point it's been used in software for the last 30 years.
its just bad design and i edited my post with examples as to why i think its silly but ITS UR SOFTWARE DO WHAT U WANT XDDDDD
Many of our translations are actually by country.
e.g. we have both a Spain Spanish and Latin America Spanish. Portuguese for both Portugal and Brazil. Chinese for both China and Taiwan.
Our current English is marked as US English, hence the US flag, but we could also add an en-GB for Britain, where we fixed spelling of colour, favourite, and whatever other things you would need to change there. (I also can't guarantee that the content of the text we've marked as en-US really is US English, but we did mark it that way, so it makes sense to use a matching flag.)
Quick question, I'm not fully understanding: flags are being picked by country, not by language? Because I can see some bad words being mouthed off by Catalans having a Spanish flag and not the Catalan flag, and maybe LATAM Spanish being represented by Mexico only, when it should cover the entire Spanish-speaking America.
Quick question, I'm not fully understanding: flags are being picked by country, not by language? Because I can see some bad words being mouthed off by Catalans having a Spanish flag and not the Catalan flag, and maybe LATAM Spanish being represented by Mexico only, when it should cover the entire Spanish-speaking America.
We can add special cases if people make a big stink about it.
This is just me wondering but why not just use emoji flags instead? Even for FSUI there’s emoji support nowadays. Would it not be nice not having to import all these flags?