Ability to use user-selected or system culture in RequestLocalizationOptions
Fixes #44286
We faced an issue in OrchardCore, the current culture based on the user-selected culture all the time because CultureInfo called the default constructor with `useUserOverride
It would be nice if we can fix this behavior by adding a simple parameter to RequestLocalizationOptions that allow us to use whether to select user-selected culture or default system culture
/cc @DamianEdwards
Thanks for your PR, @hishamco. Someone from the team will get assigned to your PR shortly and we'll get it reviewed.
I just set the default value to true to avoid behavior breaking changes
Thanks @hishamco. Can you log an issue for this please?
Can I refer to the Orchard Core issue because it contains much details, otherwise I will file an issue here
Seems it has been years since I contributed to localization after the repo becomes HUGE ;) Does the PublicAPI.Shipped auto generated or shall I need to modify it?
There's a code fixer for it in Visual Studio so you should just be able to Ctrl+. to fix it.
Is there another way to modify that file, I'm unable to do it from VS code the project is HUGE, my laptop is hanging ;)
Docs don't seem to indicate another way: https://github.com/dotnet/aspnetcore/blob/main/docs/APIBaselines.md
You should only need to open a filtered solution (or even just a project) that contains the affected APIs and run it in the context of that though.
I already opened the middleware solution, I will have a try
Seems it doesn't work with I'm expecting that I need to install preview bits of .NET Core 8 version
@hishamco the repo relies on bits installed locally to the repo. You should only need to run restore.cmd in repo root to get required bits.
I got the following exception during the restore process
D:\Git\Repositories\aspnetcore\src\Servers\IIS\build\Build.Common.Settings(12,3): error MSB4019: The imported project " D:\Git\Repositories\aspnetcore.tools\msbuild\17.1.0\tools\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.Default.props" was n ot found. Confirm that the expression in the Import declaration "D:\Git\Repositories\aspnetcore.tools\msbuild\17.1.0\t ools\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.Default.props" is correct, and that the file exists on disk. [D:\Git\Repo sitories\aspnetcore\src\Servers\IIS\AspNetCoreModuleV2\AspNetCore\AspNetCore.vcxproj]
Do I need a C++ packages? If this will take long, I can modify the APIs, after @halter73 reply on my comment in the original issue, then if some can modify the PublishedAPI file it will be helpful
Hope if we can merge this before shipping v7.0.0
Hope if we can merge this before shipping
v7.0.0
Unfortunately, it's far too late to merge any non-critical changes in .NET 7. This will have to wait until .NET 8.
I suspect you can build Localization.slnf without a C++ SDK, but the easiest thing to do is probably to follow our BuildFromSource doc and run ./eng/scripts/InstallVisualStudio.ps1. I think this should install all the necessary SDKs for .\restore.ps1 to complete successfully.
./build.cmd -nobuildnative should also work
BTW @halter73 could you please doble check the APIs file coz I faced issue with VS, but I struggled to modify it