Java equivalent for CultureInfo.InvariantCulture Property in C#
Yes,I am new to java and this question is asked in some other links in stackoverflow ( Java equivalent of Invariant Culture). But still there is no conclusion stating that,
Also what will the below statement do in java.
Locale invariant = new Locale("","","");
Am interested in the above statement because in C# the below code will bring the Invariant culture setting.
CultureInfo Invc = New CultureInfo("");
I like to know whether this is possible to have invariant culture setting in java, Is it possible by any workarounds or how to write code in Java with independent culture settings. The below MSDN quote states the necessary of independent culture settings.
Storing data in a culture-independent format guarantees a known format that does not change. When users from different cultures access the data, it can be formatted appropriately based on specific user. For example, if your application stores DateTime types in a text file, formatted for the invariant culture, the application should use the InvariantCulture property when calling ToString to store the strings and the Parse method to retrieve the strings. This technique ensures that the underlying values of the DateTime types do not change when the data is read or written by users from different cultures.
Compare Locale.ROOT:
The root locale is the locale whose language, country, and variant are empty ("") strings. This is regarded as the base locale of all locales, and is used as the language/country neutral locale for the locale sensitive operations.
链接地址: http://www.djcxy.com/p/75102.html上一篇: 十进制? 类型不是文化特定的