forked from OrchardCMS/OrchardCore
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tryFixLocalizationRule OrchardCMS#16153
- Loading branch information
Showing
5 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
src/OrchardCore.Modules/OrchardCore.Demo/Localization/zh-CN/OrchardCore.Demo.po
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
msgctxt "OrchardCore.Demo.Services" | ||
msgid "This is an internationalisation rule test." | ||
msgstr "这是一项国际化规则测试。" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/OrchardCore.Modules/OrchardCore.Demo/Services/TestLocalizationService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using Microsoft.Extensions.Localization; | ||
|
||
namespace OrchardCore.Demo.Services; | ||
public class TestLocalizationService | ||
{ | ||
private readonly IStringLocalizer S; | ||
|
||
public TestLocalizationService(IStringLocalizer<TestLocalizationService> stringLocalizer) | ||
{ | ||
S = stringLocalizer; | ||
} | ||
|
||
public string SayHello() | ||
{ | ||
return S["This is an internationalisation rule test."]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters