Is Culture in C# equivalent to Locale in Java?

拈花ヽ惹草 提交于 2019-12-10 12:35:30

问题


C# uses the concept of Culture. Is this operationally similar to Locale in Java or are there significant differences in the underlying concepts?


回答1:


Working in terms of Culture rather than Locale is an attempt at finding the correct level of abstraction — considering things in terms of groups of people who do things in similar ways, rather than talking about geographic areas and languages and somewhat derangedly thinking those correspond reliably to sets of cultural conventions.

They're similar in intent, just "Culture" is trying to find the abstraction sweet spot that "Locale" dramatically missed.




回答2:


I am not particularly familiar with Java, but from what I can tell CultureInfo is roughly equivalent Locale in Java.

In short, it provides functionalty for formatting of numbers and dates, writing systems, string sorting and calendar functionality according to regional rules, regional meaning a combination of language or language and geographical region (and in some cases language, geographical region and alphabet).



来源:https://stackoverflow.com/questions/1312034/is-culture-in-c-sharp-equivalent-to-locale-in-java

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!