Skip to main content

Language support matrix

Support labels are evidence-based and split across date parsing, HTML/header metadata, text/script detection, and end-to-end extraction. A language is called supported only when its committed date fixture and listing behavior pass. Partial means metadata or text detection exists but the qddate date corpus is not sufficient. metadata-only text detection means the language is taken from <html lang> and HTTP headers, not guessed from the page text.

Print the same matrix from the command line with newsworker languages (--format json or markdown for scripts).

LanguageDateMetadataTextExtraction
English (en), French (fr), German (de), Portuguese (pt), Russian (ru), Spanish (es), Ukrainian (uk)testedtestedtestedsupported
Italian (it)testedtestedmetadata-onlysupported
Arabic (ar), Bulgarian (bg), Chinese (zh), Czech (cs), Greek (el), Hebrew (he), Hindi (hi), Japanese (ja), Korean (ko), Thai (th)unsupportedtestedtestedpartial

The source of truth is newsworker.language.LANGUAGE_SUPPORT; localized date examples are in tests/fixtures/languages/matrix.json, and the extraction corpus (tests/corpus) covers listing layouts, absolute and relative dates in all eight supported languages. newsworker requires qddate 1.1.0 or newer. General-purpose missing date patterns belong upstream in qddate rather than in a second newsworker date engine. newsworker only reshapes short date lines that qddate cannot read as written: a leading dateline place or weekday is dropped and a day span keeps its first day, so GENEVA, 21-22 July 2022 reads as 21 July 2022 and Monday, January 31, 2022 as 31 January 2022.

Page language and dates​

Dates are matched with the page language's qddate patterns first. The language is the explicit --language / default_language, else the page metadata (<html lang>, <meta http-equiv="content-language">, og:locale, <meta name="language">), else the Content-Language header; item text is not used, because dates are read before items exist. Codes are mapped to qddate's (cs is qddate's cz), and the language-specific parser also knows every numeric pattern (05.06.2022, 2022-05-06, 05/13/2022).

A text that the page language's patterns do not read is tried again with all of qddate's languages, so wrong metadata (<html lang="en"> on a German site) does not lose dates. Text without letters skips that second pass: only numeric patterns can read it, and the first parser has them all. Without language evidence, or for a language qddate does not know (ja, zh), every date is matched with all languages, as before.

Day and month order​

qddate reads 05/06/2022 day first (5 June) but 05/13/2022 month first (13 May), and a two-digit year (05/06/22) month first. A list mixing them would put items in the wrong order, so newsworker picks one order for every group of dates a page prints together (a date cluster, or the items of a spec):

  1. If any numeric date starts with a number above 12 (13/05/2022), the group is read day first; if any has a number above 12 in second place (05/13/2022), month first. Contradicting groups keep each date as read.
  2. Otherwise the page locale decides: en-US (from --language, <html lang>, og:locale or Content-Language) reads month first, every other locale and a page without one day first. A --language without a region (en) keeps the region of a page in that language (en-US).

Ambiguous dates are then read again in that order with qddate's other reading (date_1 ↔ date_usa, date_8 ↔ date_usa_1), keeping any time of day. Dotted and dashed dates (05.06.2022) have only a day-first reading in qddate and keep it. newsworker explain shows the order of each group and why.

An explicit --language override wins over every automatic signal. With diagnostics enabled, automatic selection reports automatic_evidence, ambiguous_evidence, or default_fallback instead of silently implying certainty.