Secret command Google doesn’t want you to know
Posted by Michał ‘mina86’ Nazarewicz on 20th of November 2022
Or how to change language of Google website.
If you’ve travelled abroad you might have noticed Google tries to be helpful and uses language of the region you’re in on its websites. It doesn’t matter that your operating system is in, say, Spanish; Google Search will still use Portuguese if you happen to be in Brazil.
Fortunately, there’s a way to coerce it into using specific language. All you need to do is append
?hl=lang to website’s address replacing lang by a two-letter code of the desired language. For instance,
?hl=es for Spanish,
?hl=ht for Haitian or
?hl=uk for Ukrainian.
If the URL already contains a question mark, you need to append
&hl=lang instead. Furthermore, if it contains a hash symbol, rather than appending the string, it needs to be inserted just prior to the hash. For example:
This doesn’t work on all Google properties. Thankfully, it seems to do the trick where it matters: on pages which try to guess the preference without option to override it. For example, while Gmail ignores the parameter, its display language can be changed in its settings (accessible via gear icon near the top right of the page). Similarly, YouTube strips the parameter but it respects preferences configured in the web browser.
PS. Anyone familiar with HTTP might wonder why Google doesn’t just look at the
Accept-Language header. Apparently the issue is that many users have their browser configured with defaults of sending English as the only option even though they would prefer another language. In those cases it’s more user-friendly to ignore that header. Turns out localisation is really hard.