Canada Locale for navigator.language coming in as 'en' and not 'en-ca'

Before upgrading my computer to Catalina and my iPads to 13.4, navigator.language was returning 'en-ca' when my language/region were both set to Canada. After the upgrade it's coming in as 'en'.


Does anyone have any information on this? It's causing issues in a project of mine. I need the canada locale code from Safari browser.


I tested other 'en' languages and they all had 'en'-[area code]


Please please please help

Posted on Apr 9, 2020 3:18 PM

Reply
4 replies

May 17, 2020 7:32 PM in response to BoogWoog

It's not just Canada; I live in the US, and navigator.language is now (as of iOS 13.4.1) returning "en", where it formerly returned "en-US".


I noticed this immediately because I have a web site that formats dates and numbers according to locale information, which (until 13.4.1) used to be contained in navigator.language. For example, the Javascript Date method toLocaleDateString formats the date differently depending on whether you pass it "en-US" or "en-GB" (Great Britain). If you just pass "en", you're rolling the dice. As of iOS 13.4.1 (and apparently the latest Catalina update), Apple has apparently removed the ability to detect the user's preferred region using Javascript. I sure hope they consider this a bug and not a "feature."

Apr 12, 2020 11:11 AM in response to BoogWoog

Hi BoogWoog, 




Thank you for reaching out to Apple Support Communities.




I see that you have an issue with the Canada locale for Safari on your Mac. I want to help! This article has the steps to take to Change the language your Mac uses - Apple Support


Also, there is a more recent iPadOS version. You can update to iPadOS 13.4.1. It’s a good idea to backup your iPhone before updating. 


Here’s How to back up your iPhone, iPad, and iPod touch - Apple Support

Here’s how to: Update your iPhone, iPad, or iPod touch - Apple Support 


Test to see if updating helps. If you need further assistance after following those steps, reach out Apple Support directly  here: Get Support



Best Regards! 

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Canada Locale for navigator.language coming in as 'en' and not 'en-ca'

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.