简体   繁体   中英

.NET CultureInfo Localized DisplayName

If I write this code:

var displayName = new CultureInfo("ja-JP").DisplayName;

The value of displayName is:

"Japanese (Japan)"

Is there a way or a property on a CultureInfo instance that will give me the localized display name? For example, instead of:

"Japanese (Japan)"

I want to get:

日本語(日本)

Use CultureInfo.NativeName property like:

var nativeName = new CultureInfo("ja-JP").NativeName;

This will give you: nativeName = "日本語 (日本)"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM