We’d have to add a large lookup table to Module:Char - OpenStreetMap Wiki, but we could just manually replace the flags on this page by replacing the country names with ISO country codes.