Is it safe to use Locale as a way to store “Countr

2019-07-25 19:42发布

问题:

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.



标签: locale