开发者

CultureInfo for Latin language

I develop an app for working with multi-language resources. In database, when I need colomn with language identifier, I use language LCID开发者_如何学JAVA. Now I need to add new language - Latin. It's LCID - 1142. But when I try to create new CultureInfo(1142) - exception thrown. Is there any way to solve this problem? Somehow add Latin language to CultureInfo available languages.

Thank you for your answers.


I don't believe that is possible. Latin is not supported as a culture.

The .NET Framework has specific functionality for creating custom cultures, but you don't get to decide the LCID. The LCID is always 0x1000 for a custom culture.

For replacement cultures the culture identifier is mapped to the corresponding National Language Support (NLS) locale identifier. For user-defined custom cultures, the value of this property is always hexadecimal 0x1000.

Reference

You may be better off storing the name of the culture in the database, instead of the LCID. This would allow you to load custom cultures since they are always loaded by name. Once that is done, you can proceed to create your own culture.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜