Description Usage Format Details Note References Examples
This dataset contains the language and country code values that are accepted by GNU gettext. Its primary purpose is to allow checking of the "Language" field of PO translation files.
1 2 3 |
language_codes
is a list with two character vector elements.
Lowercase two letter ISO 639-1 codes, and some lowercase three letter ISO 639-2 codes representing languages.
Uppercase two letter ISO 3166-1 alpha-2 code representing countries and territories.
An object of class character
of length 1.
Valid "Language" field values consist of a language code taken from the
language
element of this dataset, optionally followed by an underscore
and a country code taken from the country
element of this dataset.
The language
element of the dataset contains all of ISO 639-1 as
well as the value "mo", for "Moldavian", which isn't an official ISO code.
It also contains a subset of ISO 639-2, for rare languages where there is
no ISO 629-1 code.
The country
element is identical to ISO 3166-1 alpha-2.
The dataset was generated from these the contents of these webpages: https://www.gnu.org/software/gettext/manual/html_node/Usual-Language-Codes.html#Usual-Language-Codes https://www.gnu.org/software/gettext/manual/html_node/Rare-Language-Codes.html#Rare-Language-Codes https://www.gnu.org/software/gettext/manual/html_node/Country-Codes.html#Country-Codes
1 2 3 4 5 6 7 8 | # The dataset contains:
e <- new.env()
utils::data(language_codes, package = "poio", envir = e)
e$language_codes
# Allowed values in the language field can be matched like this
# (though it will be automatically done in generate_po_from_pot)
stringi::stri_detect_regex(c("it", "nl_BE", "xxx"), ALLOWED_LANGUAGE_REGEX)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.