Since the article mentions using flags to represent languages, I feel obliged to point out that flags do not represent languages, so probably don’t use flags to represent languages.
It's clear that English originates from the UK and Portuguese originates from Portugal. Not to mention that sites often do have country variants -- the Brazilian Portuguese gets the Brazilian flag. And if a site is only for US and Mexican customers, a US flag makes sense rather than UK because it'll also use US currency.
And a flag icon also helps your eye quickly find the localization drop-down mixed in with a bunch of other stuff in the footer.