Search code examples
browseruser-agent

Are User Agents always in English?


I am working on making a basic User Agent parser, and was wondering if I would have any I18N issues with an English-centric approach.

For example, in this Safari User Agent...

Mozilla/5.0 (iPhone; CPU iPhone OS 13_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Mobile/15E148 Safari/604.1

would iPhone be translated to iPhonella in Finnish? Also, would non brand name words be translated, such as Mobile and Version.


Solution

  • If anyone has this question in the future, I have come to the consensus that the user agent will always be in English. (or at the very least, a specific user agent will always be the same language)

    According the the Mozilla documentation, the common user agents are always in English.

    Chinese Mozilla Documentation

    Additionally, there is a block list on GitHub for Chinese user agents, and the strings it blocks are all in English.

    Chinese UA block rule