ISO 3166 contains a list of country codes with two characters, for example, US , UK , FR .
The shopping cart I used has both of these codes, as well as culture codes such as ru-US or ru-UK .
For a separate project, I thought that a longer code is more useful because it at least tells me the language used by this country. But I can not find the exact list of them.
Should I use these "culture codes" to keep track of countries or just stick to the ISO 3166 double-digit names? What could be the catch of use?
I'm not sure why a shopping basket that is locked in English will even take care of en-USA vs USA. Any insight?
Edit: Also, where can I get a list of culture codes? Is this an ISO standard? Is it right to assume that a country part of a culture code is an ISO 3166 country code?
Country codes are used to identify countries. Just a country.
Crop codes are used to identify crops to indicate their specifics, such as decimal places, date separators, currencies, etc. Here you are not directly interested in the country, but in a certain culture.
, ISO 3166 . . - "IP-to-country", , .
, , .
, .
, . , , , , (, ..) .. ISO 3166, (-2), (-3) .
ISO-3166-1 Alpha-2 - ccTLD, .
, , , . ISO 639. : -2, -3, -3 -3 .
.
. , , -, , , , .
, en-US. , - (), - .
, , . , , "$" 100 , ( ), ..
. . , ( ). 18 , 20% .
, . , (. vs ,).
,
, ISO 3166 - GB, ( " " ), DNS TLD (- , ). " " en-GB, en-UK.
, (), (en-US). , / , . (pt-BR vs pt-PT), , (fr-CA en-CA).
, , , ISO. , .
, , ISO.
If you also want to track user culture for presentation purposes (e.g., translations, date and number formatting), you must save both. Nothing should prevent a user living abroad from using his native language and culture settings. For example, French-speaking Canadians residing in the United States may have a US country code, but want to use the fr-CA culture code.
Source: https://habr.com/ru/post/1720929/More articles:Drupal lets you view unpublished content - drupalCan Ruby say when a USB drive is connected to the USB port on Linux? - linuxChanging an interrupt in 16-bit mode - assemblyPygame engines - pythonCreate an iPhone Style Icon Effect on a Thumbnail Image? - c #Is there an effective persistent index data structure with multiple indexes - immutabilityHow to debug .exe launched by another .exe in Delphi - debuggingМинимальное перпендикулярное Расстояние от точки до линии в алгоритме 3D плоскости - mathC # Install a font in a Windows font folder - c #How do you meet the minimum OS requirements in a Cocoa application? - cocoaAll Articles