-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Make PortableObjectStringLocalizer simpler for inheritance #9569
Conversation
I'm not sure if this is necessary. Why would you want to inherit the PortableObjectStringLocalizer? |
There are some case to allow developers to subclass the localizer. I remember one example is to allow multiple path to load the localization resources from. Make the members open some extensibility @amolodenov you can mention your use case if it's possible |
I need to use few cultures at the same time. For this, I planned to implement an analogue https://github.com/aspnet/Localization/blob/master/src/Microsoft.Extensions.Localization/ResourceManagerWithCultureStringLocalizer.cs, but PortableObjectStringLocalizer did not allow inherit correctly. I know ResourceManagerWithCultureStringLocalizer is obsolete, but changing CurrentCulture doesn't suit for me.
|
Any update on this, I think the idea to make the localizer more extensible nothing else |
/cc @sebastienros |
Can we triage this? |
Merging, but we should not make it a habit. It's exposing things we might regret as it's increasing the burden on breaking changes for future versions. One can easily copy the code if necessary. There isn't much value in inheriting directly from it. |
Sometimes there's a need to customize the default behavior, Copy paste is not good all the time ;) |
Fixes #9542