docs icon indicating copy to clipboard operation
docs copied to clipboard

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

Open ByZhouhang opened this issue 1 year ago • 0 comments

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

ByZhouhang avatar Oct 19 '24 14:10 ByZhouhang