Skip to content

Improved src lang detection

Choose a tag to compare

@boldwebdev boldwebdev released this 14 Apr 09:01
· 1 commit to 1.x since this release

Fix: Source language is now normalized for the DeepL API. Codes that are only valid as targets (e.g. en-GB, en-US, pt-PT, pt-BR) are no longer sent as source_lang; regional variants are stripped to the correct base source code (e.g. en, pt, de).
Resilience: If DeepL still returns a 400 related to source_lang, the request is retried once with automatic source detection (source_lang omitted).
Docs: config/deepl.php comments updated to clarify that language_mapping is mainly for targets and that sources are normalized in code.