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

detectLocaleFromCookie helper #18

Open
3 tasks done
DavidDeSloovere opened this issue Nov 24, 2023 · 3 comments
Open
3 tasks done

detectLocaleFromCookie helper #18

DavidDeSloovere opened this issue Nov 24, 2023 · 3 comments
Labels
feature Includes new features

Comments

@DavidDeSloovere
Copy link
Contributor

DavidDeSloovere commented Nov 24, 2023

Clear and concise description of the problem

The Only default helper to resolve the locale is detectLocaleFromAcceptLanguageHeader. To get it from a cookie, one needs to write custom code.

Suggested solution

Implement a detectLocaleFromCookie helper

Alternative

Using custom function is already possible, but since there is a helper for accept-language already, more helpers make sense.

Additional context

No response

Validations

@DavidDeSloovere DavidDeSloovere added the feature Includes new features label Nov 24, 2023
@DavidDeSloovere
Copy link
Contributor Author

I'd be happy to send a PR.

@kazupon
Copy link
Member

kazupon commented Nov 27, 2023

Thank you for your feedback!

You are right, it would be more convenient for us if there was a helper.
However, in order to support this, it is necessary to support not only Cookies, but also Queries, and Paths.

see more ref:
https://github.com/intlify/h3#%EF%B8%8F-utilites--helpers

@DavidDeSloovere
Copy link
Contributor Author

Not sure if you want me to do it. If so, I will need #25 first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Includes new features
Projects
None yet
Development

No branches or pull requests

2 participants