You can't trust that flags will be available, and you open yourself up to political/territorial disputes.
Windows doesn't render the Unicode flags (likely due to maintenance and territorial disputes).
Mainland Chinese iPhones don't render the Republic of China flag
Would you use the current Afghanistan flag, or the Taliban flag for Pashto (Afghani)?
Some languages don't have recognisable flags (our translation platform doesn't have a flag for Cantonese)
Flag to language is a many to many mapping. My Android lists ~107 available languages under 'English'.
- a Union Jack, because that’s the origin
- an American flag, because it’s the largest English speaking nation
- or their own flag (e.g. Australian)
if the language is English?
(2) You have a dependency on the number of states in the US. British people tolerate seeing the US flag, but it implies en-US, rather than en-GB
It's much more simple to avoid these issues by using a generic "A/文" symbol
But that's not the question, anyway. The question is how to label the button that lets the user change the language when the user might not understand the current language at all. Perhaps a big bright "?" ...?