The language selector is a button that allows your visitors to select the language of the page. This is a necessary element that ensures visitors of all nationalities can read your content. Luckily we can automatically detect the country of your visitor throught their IP address. This means that the language selector is only relevant for people who don't speak the language of the region they're residing.
A flag is often used in language selectors. This might be problematic as flags are symbols of nations, not necessarily of language (US English and UK English for example). The flag also adds a lot of color, which might not be desirable as it can distract the visitor.
Read more in this article about Flags