Repository navigation
v0.4.0
Pre-release
Pre-release
Pre-release. SDKs and integration guide: README.
What's in 0.4.0
Behaviour change for integrations: a target language nobody mapped now uses its default where one is obvious, instead of failing.
Added
- Default targets in
Languages(all five SDKs,spec/languages.json→defaultTargets,defaultTarget,suggestTarget,targetOptions):de→de-DE,en→en-US,fr→fr-FR,it→it-IT,pt→pt-PT,zh→zh-Hans,sr→sr-Latn;zh-TW/zh-HK/zh-MO→zh-Hant,zh-CN/zh-SG→zh-Hans;language-Script-REGION→language-Script(sr-Latn-RS→sr-Latn); a region of a bare target → the bare target (es-ES,es-419→es,nl_NL→nl,nb-NO→nb). Nothing else is guessed:de-LI,en-IE,fr-BE,sr-RS,gsw,noandde_DE_formalstill need a mapping. defaultTarget(code)(the default, or null for a code with an exact match or without a default),suggestTarget(code)(exact match, else default, else null: what a settings screen preselects),targetOptions()(the targets sorted by English name, for the language combo box) and theDEFAULT_TARGETStable. TypeScriptLanguages.defaultTarget/suggestTarget/targetOptions/DEFAULT_TARGETS(also as named exports); PHPLanguages::defaultTarget()/suggestTarget()/targetOptions()/DEFAULT_TARGETS; PythonLanguages.default_target/suggest_target/target_options/DEFAULT_TARGETS; .NETLanguages.DefaultTarget/SuggestTarget/TargetOptions()/DefaultTargets; JavaLanguages.defaultTarget/suggestTarget/targetOptions()/DEFAULT_TARGETS.
Changed
Languages.target(code, mapping): the mapping, else the exact match, else the default, elseunsupported_language.Languages.target('de')is nowde-DE(wasunsupported_language),es-ESises.matchTargetstays exact-only; sources are unchanged.- Integration guide → Language codes: the mapping is a combo box per CMS language with Supertext's codes, the suggested code preselected, names localized with the platform's display-name facility and the code shown next to them; the defaults table; an environment or config mapping overrides the defaults.