Created
January 26, 2021 23:05
-
-
Save kamilklkn/44d2b194c5db6814890d4556a3ff09ed to your computer and use it in GitHub Desktop.
Browser silini algılama
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const detectLanguage = (defaultLang = 'en-US') => | |
navigator.language || | |
(Array.isArray(navigator.languages) && navigator.languages[0]) || | |
defaultLang; | |
ÖRNEKLER | |
detectLanguage(); // 'nl-NL' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment