Skip to content

Using multiple files for localization #1

@Sandeep321

Description

@Sandeep321

What I understand of localization in .Net core is that I need to inject IStringLocalizer of every resource type into controller if I would want to use that resource file in a particular controller.

I wanted to create separate resx files for different types of messages(lets say info, warn and error). I would want to use all the files across all my controllers (maybe in some other classes as well). I don't want to face a situation where I will have to inject all the dependencies (IStringLocalizer) into my controller, one for each resource file. What if I have 10 resource files, I don't want to insert all of them into my controllers separately.
Does anyone knows how to achieve that kind of scenario with .Net core.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions