-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
About NET5.0 Blazor WebAssembly Uses My.Extensions.Localization.Json #62
Comments
Hi @GreenShadeZhang I did some localization in Oqtane Framework (Blazor), I may look again into the
I'm not sure if it's the right time, I followed the same naming convension of ASP.NET Core Extensions at the beginning, I think it's not a big issue while there's a tags attached on the NuGet package Thanks |
Hello, have you tested some problems in the NET5.0 Blazor WebAssembly project? |
Sorry @GreenShadeZhang I was busy last few days, hope to do it today or tommrow, could you please create a minimal repo, so I can easily figure out the issue and test it |
https://github.com/GreenShadeZhang/BlazorAppTest This is a NET5.0 Blazor WebAssembly test project, the main reason is to expose Microsoft.AspNetCore.Mvc namespace problems, I looked at the source code NET5.0 Blazor WebAssembly multi-language only used Microsoft.Extensions.Localization, your library is implemented razor page and mvc interface, I hope you'll help you see if you're going to leave the library alone for Blackzor Web Assembly or continue in compatibility mode. |
Thanks @GreenShadeZhang, I will have a look ... |
Seems I was wrong when I add |
I figure out the issue, which came from introduing |
PR #46 is the main reason for this, a better solution is to create another package for MVC specific localization |
@GreenShadeZhang I just removed the dependency, hopefully I will release the upcoming release with few days, you could try GitHub Packages for now without waiting https://github.com/hishamco?tab=packages&repo_name=My.Extensions.Localization.Json please let me know if this fix your issue |
When I use the package you remove, there will also be an error, as if it were an error caused by a resource path read, and it is recommended that you test it with the NET5.0 Blazor WebAssembly project. |
Please refer me to the page that causes the issue, I will try to update the blazor sample to |
Hello this time I test your code, I upgraded sdk to net5.0, managed in server mode, running your code is normal, but when I use WebAssembly to produce file read problems, the cause of the problem is that the json file read place blazor has adjustments, resulting in not being able to take the path to get jason files, this is my guess, I hope you have time also test, originally I intended to give a pr but I did not test successfully. |
Feel free to submit a PR if it's required, I will check the Blazor WebAssembly app too |
We update to .NET 7 reopen if you still facing the issue |
A limited set of ASP.NET Core's localization scenarios are currently supported:
IStringLocalizer and IStringLocalizer are supported in Blazor apps.
IHtmlLocalizer, IViewLocalizer, and Data Annotations localization are ASP.NET Core MVC scenarios and not supported in Blazor apps.
When I use it, there's a Microsoft.AspNetCore.Mvc.Localization reference, so can this library separate the code so that NET5.0 Blazor WebAssembly works.
Also, can the name of this library be changed to a more formal name? The name gives a less formal feel.
The text was updated successfully, but these errors were encountered: