Template:ISO 639 name/doc

Usage
The template is used to resolve ISO 639-1, ISO 639-2, ISO 639-3 and ISO 639-5 codes to language names. It will trim extraneous IETF language tags to just the ISO 639 code. E.g.: Sanskrit in Latin script, which IETF language tag is, renders as: The error message can be suppressed with yes: The rendered language name can be linked to the appropriate language article with yes: When linking, an alternate link label can be provided with &lt;label text>:

The template is the same as  except that it presets yes.

Both of these templates be safely substituted.

Other functions
This template can be used to execute any of the functions exported by Module:ISO 639 name. These function are: To use these functions set fn to the appropriate function name.
 * – returns  if   is found in any of the ISO 639 data tables
 * – (default) as described above
 * – same as  except constrained to the ISO 639-1 data table
 * – same as  except constrained to the ISO 639-2 data table
 * – same as  except constrained to the ISO 639-2B data table
 * – same as  except constrained to the ISO 639-3 data table
 * – same as  except constrained to the ISO 639-5 data table
 * – returns  if   is found in any of the ISO 639 data tables
 * – returns language code associated with ; may be constrained to a particular ISO 639 data table
 * – returns language name when given a valid language code; returns a language code when given a valid language name; may be constrained to a particular ISO 639 data table

Examples

 * gives
 * gives

Error messages
This template produces error messages. These messages are:
 * – IETF language tags are not ISO 639 language codes. When these tags are encountered, the template attempts to render the correct language and also emits this error message
 * – where &lt;part> is 1, 2, 3, 5; template was called without the required language code
 * – &lt;code> fails simple length validation; 639 part 1, language codes are two characters, for 639 parts 2, 3, and 5, language codes are three characters
 * – &lt;code> not found after searching ISO 639-&lt;part> data

The module that does the work for this template has other functionality not supported by this template. See Module:ISO 639 name. Error messages related to that other functionality are:
 * – module function  only – this message emitted when a language name is not provided in the
 * – module functions  and   only – this message emitted when &lt;part> is not one of 1, 2, 3, or 5
 * – module function  only – this message emitted when a language name or a language code is not provided in the