-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Handling CultureInfo.InvariantCulture in RequestLocalizationMiddleware #58844
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
base: main
Are you sure you want to change the base?
Conversation
Thanks @cloudlucky. I posted a comment in the issue (#58843). Let's use the issue to discuss what should be done about this. |
@dotnet-policy-service agree |
|
Looks like this PR hasn't been active for some time and the codebase could have been changed in the meantime. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
src/Middleware/Localization/test/UnitTests/RequestLocalizationMiddlewareTest.cs:28
- The test case with an empty string as the parent culture might be incorrect. Please verify if this is intended or if it should be a specific culture.
[InlineData("zh-Hans-CN", "")]
Handling CultureInfo.InvariantCulture in RequestLocalizationMiddleware
Handle CultureInfo.InvariantCulture if it's supported by the option
Description
If we add CultureInfo.InvariantCulture as a supported culture the code rejecting it and defaulted to the default configured culture.
It's happening since version 8.
Fixes #58843
Test project: https://github.com/cloudlucky/RequestLocalizationMiddlewareCultureInvariant