Skip to content

[New article]: How to utilize IStringLocalizer Internationalize some prompts in static classes (or where injection is inconvenient) #43129

@ByZhouhang

Description

@ByZhouhang

Proposed topic or title

Global Internationalization

Location in table of contents.

No response

Reason for the article

There is no relevant reference document

Article abstract

Sometimes it is inconvenient to inject IStringLocalizer. It would be very convenient if it could be internationalized using a static class, such as I18n.T("needTranslate_Code") instead of _localizer["needTranslate_Code"]. How to practice it? Hope there is relevant documentation

Relevant searches

No response

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