dotnet / dotnet/docs

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

Open
#43,129 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
4.8k
Forks
6.1k
Avg merge
19h 10m
Merged PRs (30d)
268

Description

### 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_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.