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

Add support for IStringLocalizerFactory and IStringLocalizer to allow for as many localizers as needed. #38

Open
npavlyk82 opened this issue Jun 27, 2024 · 0 comments

Comments

@npavlyk82
Copy link
Contributor

We need to get translations from different sources, such as JSON files, databases, etc.

The current logic has the following limitations:

  1. It doesn't allow for the use of multiple implementations of the IResourcesProvider interface and choosing the appropriate one depending on the path.
  2. IResourcesProvider::TryGetResourceAsync supports only complex keys, which is a blocker for implementing some composite type for IResourcesProvider.
  1. IResourcesProvider is always registered in DI with a Singleton lifetime.

I would implement a solution using existing interfaces from the Microsoft.Extensions.Localization package. The current logic can be extended without breaking existing functionality.

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

No branches or pull requests

1 participant