Found while doing #64.
convention:languageTagging (registry/conventions/languageTagging.jsonld) says language codes in label::<lang> columns and settings.default_language SHOULD be valid IETF BCP 47 tags, e.g. de, en, fr-BE. The XLSForm → LimeSurvey TSV pipeline accepts 2-letter codes only:
isValidLanguageCode (src/utils/languageUtils.ts) requires exactly two letters from a fixed list. The loader drops language columns whose code fails it, so a label::fr-BE column is silently ignored.
resolveConfig (formerly ConfigManager.validateConfig) rejects any defaults.language that isn't two characters.
To decide:
- LimeSurvey's own language codes include regional and variant forms (
de-informal, pt-BR, zh-Hans, …), so a BCP 47 tag can't always be passed straight through. Decide on a mapping from BCP 47 tags to LimeSurvey codes, and what happens to an unmapped tag. It should be an error or a warning, never a silent drop.
- DDI (
xml:lang) takes BCP 47 as is.
Either change the convention to "ISO 639-1 two-letter codes", or make the pipeline accept tags per the convention. Right now the two disagree.
Found while doing #64.
convention:languageTagging(registry/conventions/languageTagging.jsonld) says language codes inlabel::<lang>columns andsettings.default_languageSHOULD be valid IETF BCP 47 tags, e.g.de,en,fr-BE. The XLSForm → LimeSurvey TSV pipeline accepts 2-letter codes only:isValidLanguageCode(src/utils/languageUtils.ts) requires exactly two letters from a fixed list. The loader drops language columns whose code fails it, so alabel::fr-BEcolumn is silently ignored.resolveConfig(formerlyConfigManager.validateConfig) rejects anydefaults.languagethat isn't two characters.To decide:
de-informal,pt-BR,zh-Hans, …), so a BCP 47 tag can't always be passed straight through. Decide on a mapping from BCP 47 tags to LimeSurvey codes, and what happens to an unmapped tag. It should be an error or a warning, never a silent drop.xml:lang) takes BCP 47 as is.Either change the convention to "ISO 639-1 two-letter codes", or make the pipeline accept tags per the convention. Right now the two disagree.