I 'm building a React JS website and got stuck on an issue relater to the navigator problem. My default browser is Chrome and using English as a language. When I log navigator.language it gives me "he-IL", which I do use but not as default language. In the navigator.languages i get the following array:["he-IL", "en-US", "en", "he"].
Is there a way to set it to detect English only when using navigator.language? Or do I have to get it from the array?