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

Looks like short lang codes don't work (ie: en, de, fr) #20

Closed
ralyodio opened this issue Nov 19, 2019 · 5 comments · Fixed by #17
Closed

Looks like short lang codes don't work (ie: en, de, fr) #20

ralyodio opened this issue Nov 19, 2019 · 5 comments · Fixed by #17
Assignees

Comments

@ralyodio
Copy link

Uncaught Error: [svelte-i18n] Locale "en-US" not found. at Object.g.set (i18n.mjs:1) at locale.js:4 at main.js:12

@ralyodio
Copy link
Author

Tried changing to long codes, still get this error. Its not finding the dictionary I guess (copied from readme and imported into main.js)

@ralyodio
Copy link
Author

dictionary has to come above everyting else.

@ralyodio
Copy link
Author

Well I got en to load but the only way I can get german to load is to use ?lang=de

if i change chrome to use German. It is ignored even though window.navigator.language is set to 'de'. I still get english

@ralyodio ralyodio reopened this Nov 19, 2019
@ralyodio
Copy link
Author

ok so it looks like navigator, hash and search are mutually exclusive. It only uses the last one your provide.

@kaisermann
Copy link
Owner

kaisermann commented Nov 19, 2019

Hey @chovy 👋 That's my bad hahaha. This behaviour will be fixed on v2.0.0. The precedence will be: navigator > search > hash.

@kaisermann kaisermann self-assigned this Nov 19, 2019
@kaisermann kaisermann mentioned this issue Nov 19, 2019
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants