Skip to content

Latest commit

 

History

History
27 lines (17 loc) · 1.64 KB

File metadata and controls

27 lines (17 loc) · 1.64 KB

IETF Language Matching

Language tag matching supports IETF / RFC 5646 / BCP 47 tag formats as implemented by MkvMerge.

Understanding Language Matching

Tags are in the form of language-extlang-script-region-variant-extension-privateuse, and matching happens left to right (most specific to least specific).

Examples:

  • pt matches: pt Portuguese, pt-BR Brazilian Portuguese, pt-PT European Portuguese.
  • pt-BR matches: only pt-BR Brazilian Portuguese.
  • zh matches: zh Chinese, zh-Hans simplified Chinese, zh-Hant traditional Chinese, and other variants.
  • zh-Hans matches: only zh-Hans simplified Chinese.

Technical Details

During processing the absence of IETF language tags will be treated as a track warning, and an RFC 5646 IETF language will be temporarily assigned based on the ISO639-2B tag.
If ProcessOptions.SetIetfLanguageTags is enabled MkvMerge will be used to remux the file using the --normalize-language-ietf extlang option, see the MkvMerge documentation for more details.

Normalized tags will be expanded for matching.
E.g. cmn-Hant will be expanded to zh-cmn-Hant allowing matching with zh.

References