Loading...
Loading...
Detect all languages used on a webpage — both declared (html@lang, hreflang alternate links, nested lang= attributes, meta content-language) and actually present in the body text (Google CLD3 via cld3-asm WASM). Reconciles the two signal sets and flags mismatches such as undeclared languages in the body or declared languages absent from the content. Outputs langs.json with detected languages (probability + proportion), all declared language signals, and a reconciliation report. Use for i18n audits, EDS page migrations, hreflang validation, and multilingual content verification. Triggers on: detect languages, page languages, what language, language detection, i18n audit, hreflang, hreflang validation, lang attribute, multilingual page, page-langs, language audit, which language, content language, undeclared language.
npx skill4agent add adobe/skills page-langsplaywright-cliif [[ -n "${CLAUDE_SKILL_DIR:-}" ]]; then
SKILL_DIR="${CLAUDE_SKILL_DIR}"
else
SKILL_DIR="$(find ~/.claude -path "*/page-langs" -type d 2>/dev/null | head -1)"
fi
npm install --prefix "$SKILL_DIR"if [[ -n "${CLAUDE_SKILL_DIR:-}" ]]; then
SKILL_DIR="${CLAUDE_SKILL_DIR}"
else
SKILL_DIR="$(find ~/.claude -path "*/page-langs" -type d 2>/dev/null | head -1)"
fi
COLLECT="$SKILL_DIR/scripts/collect.js"
DETECT="$SKILL_DIR/scripts/detect.mjs"playwright-cli open "$URL"page-prepplaywright-cli run-code --filename="$COLLECT" \
| node "$DETECT" --output ./page-langs-outputcat ./page-langs-output/langs.jsondetectedwordCount--headedpage-prepplaywright-clideclared./page-langs-output/langs.json| Field | Description |
|---|---|
| CLD3 results: language, probability, is_reliable, proportion |
| Structural signals: htmlLang, nestedLangs, hreflang, metaContentLanguage |
| agreement / declaredNotDetected / detectedNotDeclared |
| Words in visible body used for CLD3 |
| Field | Meaning |
|---|---|
| Languages in the body not declared in markup — add hreflang or lang= |
| Declared in markup but absent from body — stale hreflang? |
| Both declared and detected — healthy |
page-prepwordCountenfren-USx-defaultdeclaredreferences/output-schema.md