Is it safe to use Locale as a way to store “Country” and “Language”

↘锁芯ラ 提交于 2019-12-11 10:02:17

问题


Wikipedia says that locale dictates a set of formatting rules for a specific language/region combination so it doesn't contain timezone or daylight savings information.

http://en.wikipedia.org/wiki/Locale

This leads me to believe that it would be a bad practice to derive the country and language elements independently and make use of them for other purposes like sorting data by a specific country.

Is it safe to say that locale doesn't map to a specific geographic location and therefore shouldn't be used to associate data to a geographic location?


回答1:


It is safe to say that locale is not connected to location, yes.

For example, a Japanese businessman in San Diego would be using his laptop set to a Japanese locale.

Likewise, a US businessman visiting China would be using a US locale.



来源:https://stackoverflow.com/questions/7976400/is-it-safe-to-use-locale-as-a-way-to-store-country-and-language

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