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

IStringLocalizer support in Blazor #17201

Closed
TPIvan opened this issue Mar 4, 2020 — with docs.microsoft.com · 5 comments
Closed

IStringLocalizer support in Blazor #17201

TPIvan opened this issue Mar 4, 2020 — with docs.microsoft.com · 5 comments
Assignees
Labels
Milestone

Comments

Copy link

TPIvan commented Mar 4, 2020

Does the statement that "IStringLocalizer<> is supported in Blazor apps" mean that I may to inject and use it in my own code or is it used also internally (e.g. for localizing error messages)?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@dotnet-bot dotnet-bot added ⌚ Not Triaged Blazor Source - Docs.ms Docs Customer feedback via GitHub Issue labels Mar 4, 2020
@guardrex
Copy link
Collaborator

guardrex commented Mar 4, 2020

Hello @TPIvan ... Yes, that's right. Here's how the JsonStringLocalizer example (one of the example projects listed at https://docs.microsoft.com/aspnet/core/fundamentals/localization-extensibility#localization-resources) demos it (injected into Configure) ...

https://github.com/hishamco/My.Extensions.Localization.Json/blob/master/samples/LocalizationSample/Startup.cs#L20

@TPIvan
Copy link
Author

TPIvan commented Mar 4, 2020

So it is not used by Blazor framework internally.

@guardrex
Copy link
Collaborator

guardrex commented Mar 4, 2020

Sorry ... I missed the 2nd part of your question. It seems yes ... it is used internally. However, the setup might not be as devs expect. I noticed various discussions on the subject that lead to me to believe that either cross-links or an outright example would be helpful. For example ...

I'd like to take a closer look at this. However, we're crazy busy these days, so I'll need to backlog this for a while until I get some free time to take a closer look.

If you need help, devs apparently have been working with localization in Blazor, including localization of error messages. Reach out on the usual support channels if you don't find what you need in blog resources and the ASP.NET Core docs in the main doc set ...

... and if you find out that it is simply using an ordinary approach already covered in the localization docs here ... in the MS doc set ... please do comment back here with that information. I would like to cross-link to our own content if possible.

@guardrex guardrex reopened this Mar 4, 2020
@guardrex guardrex self-assigned this Mar 4, 2020
@guardrex guardrex added this to the Backlog milestone Mar 4, 2020
@guardrex
Copy link
Collaborator

Note to self: dotnet/aspnetcore#12158.

@guardrex
Copy link
Collaborator

guardrex commented Jun 4, 2020

Ok ... I took a closer look. Loc issues are being addressed by engineering. They don't have a "loc" label, but searching blazor-labeled issues with "localization" turned up ...

https://github.com/dotnet/aspnetcore/issues?q=is%3Aopen+is%3Aissue+label%3Aarea-blazor+localization

I think what we call out in the topic as "supported" is correct today. Other loc features should be covered in the engineering issues or requested on the engineering repo. When data annotations are available, then we'll open an issue to cover it when the time comes.

I don't think we'll have time to add a dedicated loc sample. I'm having this little break for a few months to get caught up on issues, then 😅 5.0 preview issues are going to start appearing here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

3 participants