Difference between revisions of "Countries taxonomy"

From Open Food Facts wiki
Jump to navigation Jump to search
Line 5: Line 5:
  
 
== Country codes ==
 
== Country codes ==
ISO standards, basis for country codes
+
[https://www.iso.org/iso-3166-country-codes.html ISO 3166] standard is used for the country codes.
 +
 
 
== Implementation ==
 
== Implementation ==
 
The taxonomy currently in use is found on [https://github.com/openfoodfacts/openfoodfacts-server/blob/main/taxonomies/countries.txt Github].
 
The taxonomy currently in use is found on [https://github.com/openfoodfacts/openfoodfacts-server/blob/main/taxonomies/countries.txt Github].

Revision as of 08:14, 19 December 2023

Introduction

The Countries taxonomy is one of the Taxonomies that form the basis of OFF. This taxonomy gives a list of all supported countries, their translations and short cuts (the country codes).

This taxonomy was built from Wikidata to get synonyms and translations for country names, 2-letter and 3-letter country codes, and official language. Some changes were then made manually, in particular to add missing languages, change the order of languages (which was not retrieved from wikidata) and in some special cases to change the country code (in particular GB to UK) and the main country name (United States of America to United States).

Country codes

ISO 3166 standard is used for the country codes.

Implementation

The taxonomy currently in use is found on Github.

Attributes

  • Wikidata - Each country has a link to wikidata, like: wikidata:en:Q31
  • Languages - A list of official languages in preferred order, like language_codes:en:nl,fr,de
  • ISO two-letter country codes, like country_code_2:en:BE
  • ISO three-letter country codes, like country_code_3:en:BEL

Usage

Where is this taxonomy used?

Maintenance