Changed the language toggle handling

The language codes are reserved for i18n and using them results in languages string being overwritten in some languages.
Merge pull request #4288 from LaurentGoderre/better-i18n

Changed the language toggle handling