Template:R/langcode/doc

From MOASSpedia
Jump to navigation Jump to search

This is a subtemplate, implementing the language-parameter evaluation. Recognized language codes will be kept as is, recognized language names will be converted into language codes, unrecognized codes or names will be left unchanged.

Usage

For internal use only:

|language=code/name

Note: This subtemplate is used by {{r/ref}}.

Examples

  • {{R/langcode|language=de}} → de (recognized ISO code)
  • {{R/langcode|language=ru}} → ru (recognized ISO code)
  • {{R/langcode|language=ru-Latn}} → ru-Latn (recognized ISO code)
  • {{R/langcode|language=he-LA}} → he-LA (recognized ISO code)
  • {{R/langcode|language=xz}} → mis (unrecognized code)
  • {{R/langcode|language=German}} → de (recognized language)
  • {{R/langcode|language=unknown}} → mis (unrecognized language)
  • {{R/langcode|language=??}} → mis (unrecognized code)
  • {{R/langcode|language=}} → mis (empty code)

See also