Skip to content

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

@npavlyk82

Description

@npavlyk82

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions