1const getNavigatorLanguage = () => {
2 if (navigator.languages && navigator.languages.length) {
3 return navigator.languages[0];
4 } else {
5 return navigator.userLanguage || navigator.language || navigator.browserLanguage || 'en';
6 }
7}
8