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

Handling CultureInfo.InvariantCulture in RequestLocalizationMiddleware #58844

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cloudlucky
Copy link

@cloudlucky cloudlucky commented Nov 8, 2024

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

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlesware label Nov 8, 2024
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Nov 8, 2024
@adityamandaleeka
Copy link
Member

Thanks @cloudlucky. I posted a comment in the issue (#58843). Let's use the issue to discuss what should be done about this.

@cloudlucky
Copy link
Author

@dotnet-policy-service agree

@cloudlucky cloudlucky closed this Nov 14, 2024
@dotnet-policy-service dotnet-policy-service bot added this to the 10.0-preview1 milestone Nov 14, 2024
@cloudlucky
Copy link
Author

@dotnet-policy-service agree

Copy link
Contributor

Looks like this PR hasn't been active for some time and the codebase could have been changed in the meantime.
To make sure no conflicting changes have occurred, please rerun validation before merging. You can do this by leaving an /azp run comment here (requires commit rights), or by simply closing and reopening.

@dotnet-policy-service dotnet-policy-service bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlesware community-contribution Indicates that the PR has been added by a community member pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RequestLocalizationMiddleware does not handle CultureInfo.InvariantCulture since version 8
4 participants