Question

I develop an app for working with multi-language resources. In database, when I need colomn with language identifier, I use language LCID. 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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top