-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Support asp.netcore IStringLocalizer<> #31
Comments
Good call. Yes, current implementation relies on conventions that don't pick this up. |
X-Ref #5 and look to add this in a way that allows identifying uses of resource strings beyond the current identifier method. |
Note. The way resources are defined in the OP (using This will need two solutions
|
This is working with the ASP.NET Core official sample for localization. It doesn't (yet) work with constant values specified for the keys, but I've got a working lookup for resolving all the different possible files to use for where the localized text may be. |
This functionality has been added to version 1.6 and is now available in the marketplace. If this extension is useful to you please leave a review (this both encourages me and helps others find this extension.) |
Installed product versions
Description
Doesn't support asp.netcore core
IStringLocalizer<T>
resource localization systemSteps to recreate
Added localization based on the microsft docs for asp,netcore: https://docs.microsoft.com/en-us/aspnet/core/fundamentals/localization?view=aspnetcore-3.1
The Strings.cs file is just an empty class
Resource files are then added to the same Resources Folder and due to naming are made a sub-item of this main strings class. The resource file as the Access Modifer set to
No Code Generation
.Add resources to the resx files.
Current behavior
The String Resource Visualizer only seems to pick up on resx files that are contained in the Properties folder of the project. Due to this is doesn't see the available resources as something useable.
I suspect that it might not recognise the IStringLocalizer...but have no idea here.
Expected behavior
Work :)
The text was updated successfully, but these errors were encountered: