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

Locale contains _ error #45

Closed
muzidudu opened this issue Mar 26, 2022 · 6 comments
Closed

Locale contains _ error #45

muzidudu opened this issue Mar 26, 2022 · 6 comments
Labels
bug Something isn't working examples Issue related to examples
Milestone

Comments

@muzidudu
Copy link

i use https://github.com/sveltekit-i18n/lib/tree/master/examples/locale-router

if change [current] = Intl.Collator.supportedLocalesOf(locale.replace('_','-'));
https://github.com/sveltekit-i18n/base/blob/272effd898f92888fc17b5735f3317ef067e1cc4/src/utils.ts#L32
I hope to modify here will not prompt an error

@jarda-svoboda jarda-svoboda added the info needed This issue needs more information to be properly identified. label Mar 27, 2022
@jarda-svoboda
Copy link
Member

jarda-svoboda commented Mar 27, 2022

hi @muzidudu
if i understand it correctly, the problem is, that in case you use a non-standardized locale it throws an error? that's desired behavior anyway, because this locale can be used later in html lang attribute etc., so it should be in standardized form...

@muzidudu
Copy link
Author

hi @muzidudu if i understand it correctly, the problem is, that in case you use a non-standardized locale it throws an error? that's desired behavior anyway, because this locale can be used later in html lang attribute etc., so it should be in standardized form...

but i set zh-Hans Prompt error as usual

@jarda-svoboda
Copy link
Member

Oh, ok, so that’s probably a bug.. If so, I’ll fix it asap and let you know.)

@jarda-svoboda jarda-svoboda added bug Something isn't working base Issue related to base functionality and removed info needed This issue needs more information to be properly identified. labels Mar 28, 2022
@jarda-svoboda
Copy link
Member

…also relevant tests should be added…

@jarda-svoboda jarda-svoboda added this to the 2.1.2 milestone Mar 30, 2022
@jarda-svoboda jarda-svoboda added examples Issue related to examples and removed base Issue related to base functionality labels Mar 31, 2022
@jarda-svoboda
Copy link
Member

@muzidudu Ok, there is probably nothing wrong about the base. It's a bug in the url parer...

@jarda-svoboda
Copy link
Member

example fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working examples Issue related to examples
Projects
None yet
Development

No branches or pull requests

2 participants