Skip to content

Commit

Permalink
Allow to set language from the URL
Browse files Browse the repository at this point in the history
  • Loading branch information
link2xt committed Aug 13, 2024
1 parent d9f683f commit 1b5b2e2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ <h2>
reactInput(window.location.hash.substr(1));

i18next.use(i18nextBrowserLanguageDetector).init({
lng: (new URLSearchParams(window.location.search)).get('lang'),
fallbackLng: 'en',
resources: Object.entries(window.i18n).reduce(function (coll, [key, translation]) {
return Object.assign(coll, {
Expand Down

0 comments on commit 1b5b2e2

Please sign in to comment.