Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remembering selected locale #24

Closed
krzysztofrewak opened this issue Jan 5, 2021 · 1 comment · Fixed by #143
Closed

Remembering selected locale #24

krzysztofrewak opened this issue Jan 5, 2021 · 1 comment · Fixed by #143
Assignees
Labels
feature new feature to implement i18n content translations

Comments

@krzysztofrewak
Copy link
Member

Right now translations are initialized in main.js accordingly to Svelte docs:

init({
  fallbackLocale: 'en',
  initialLocale: getLocaleFromNavigator()
})

It's nice, but when user refreshes page, translations are going back to navigator locale. I would like to store this data in some cookie or whatever.

@krzysztofrewak krzysztofrewak added feature new feature to implement i18n content translations labels Jan 5, 2021
@krzysztofrewak krzysztofrewak added this to the Continuous development milestone Jan 5, 2021
@krzysztofrewak krzysztofrewak self-assigned this Jan 27, 2021
@kamilpiech97
Copy link
Member

I think cookie or local storage will be okay solution.

kamilpiech97 added a commit that referenced this issue Jan 25, 2022
kamilpiech97 added a commit that referenced this issue Jan 25, 2022
kamilpiech97 added a commit that referenced this issue Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature new feature to implement i18n content translations
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants