Validate translation completeness and cultural adaptation for a generated article.
Checks performed:
RTL languages (ar, he): Verify dir="rtl" on <html>, detect bidi control markers
CJK languages (ja, ko, zh): Check that content has sufficient CJK character density
(high ASCII ratio suggests the article was not actually translated)
All non-English: Detect common English phrases that should have been translated
This function is purely analytical — no AI calls. It produces warnings only
and never blocks article generation.
Parameters
html: string
Complete HTML string of the generated article
lang: string
Language code of the article (e.g. "ar", "ja", "en")
Validate translation completeness and cultural adaptation for a generated article.
Checks performed:
dir="rtl"on<html>, detect bidi control markersThis function is purely analytical — no AI calls. It produces warnings only and never blocks article generation.