{{i}} Документація шаблону[перегляд] [редагувати] [історія] [очистити кеш]

Використання ред.

Шаблон {{ISO 639 name}} використовується для перетворення кодів ISO 639-1, ISO 639-2, ISO 639-3 та ISO 639-5 у назви мов. Він обрізає зайві теги мов IETF до коду ISO 639. Наприклад: Санскрит на латиниці, тег мови IETF якого sa-Latn, відображається як:

  • {{ISO 639 name|sa-Latn}} → Sanskrit помилка: sa-Latn є міткою IETF (допомога)

Повідомлення про помилку може бути придушено за допомогою |hide-err=yes:

  • {{ISO 639 name|sa-Latn|hide-err=yes}} → Sanskrit

Назва мови, що відображається, може бути пов'язане з відповідною мовною статтею за допомогою |link=yes:

  • {{ISO 639 name|sa-Latn|hide-err=yes|link=yes}}Sanskrit

При зв'язуванні альтернативна мітка посилання може бути представлена за допомогою |label=<label text>:

  • {{ISO 639 name|sa-Latn|hide-err=yes|link=yes|label=sa-Latn}}sa-Latn

Приклади ред.

  • {{ISO 639 name|en}} дає English
  • {{ISO 639 name|fr}} дає French

Повідомлення про помилки ред.

Цей шаблон видає повідомлення про помилки. Ці повідомлення наступні:

  • <code> is an IETF tagIETF 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
  • ISO 639-<part> code is required – where <part> is 1, 2, 3, 5; template was called without the required language code
  • <code> is not an ISO 639-<part> code – <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
  • <code> not found in ISO 639-<part> list – <code> not found after searching ISO 639-<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:

  • language name required – module function iso_639_name_to_code() only – this message emitted when a language name is not provided in the {{#invoke:}}
  • <part> not an ISO 639 part – module functions iso_639_name_to_code() and iso_639() only – this message emitted when <part> is not one of 1, 2, 3, or 5
  • language code or name required – module function iso_639() only – this message emitted when a language name or a language code is not provided in the {{#invoke:}}

Категорії відстеження ред.

Див. також ред.