Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

issue on .net core globalization

$
0
0

Hi ~ , I had some issue on .net core globalization.

I had been read the article by the following link.

https://docs.microsoft.com/en-us/aspnet/core/fundamentals/localization?view=aspnetcore-2.1

but I don't want to use this feature like the article, I consider that's so rigid, so then I do the tradition usage.

All my done was right I think, but there had some issues, I don't known why.

that's the file structure

structure

Language.resx

Language.resx

Language.en-US.resx

Language.en-US.resx

the following code always return "登录" (in right case , it will return "Login").

var culture = new System.Globalization.CultureInfo("en-US");
var title = Language.ResourceManager.GetString("Login", culture);

could someone give me the suggestion to solve this issue or other better solution?

thanks


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>