Skip to content

Commit

Permalink
Merge branch 'enable-i18n' of https://github.com/anshgoyalevil/website
Browse files Browse the repository at this point in the history
…into enable-i18n
  • Loading branch information
anshgoyalevil committed Feb 4, 2024
2 parents c64e922 + c3d72f0 commit 3a6c90c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions components/navigation/NavBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ export default function NavBar({
This ensures the components renders with the correct initial language.
*/
useEffect(() => {
/**
* First param: Passes the language based on the browser's default language
* Second param: Prevents the language change from being saved in the local storage
*/
changeLanguage(browserLanguageDetector(), false);
}, []);

Expand Down

0 comments on commit 3a6c90c

Please sign in to comment.