Declare the language of the document and meaningful language changes inside it. A translated guide can use the right words while exposing the wrong language to a screen reader. Conversely, a page can have a correct language attribute while its translation misstates the product. Review metadata and meaning as separate responsibilities.
Use a mixed-language public guide as the acceptance unit. Include the actual interface labels readers must locate, short quoted instructions, technical identifiers and proper names. The aim is understandable reading, not decorating every foreign-looking word with an attribute.
Separate Three Different Language Decisions
The document's default language describes its main text-processing language. A passage-level declaration identifies a change inside that document. Alternate-language search annotations connect localized URLs. None is a substitute for the other two.
W3C's language-of-page explanation covers programmatically determined default language. Its language-of-parts guidance addresses passages and phrases, with exceptions including proper names, technical terms, indeterminate language and words adopted into the surrounding vernacular.
The second-language launch guide covers audience, commercial scope and equivalent journeys. A correct localized launch does not establish that the browser can determine an embedded passage's language. Keep that gap explicit in the release record.
Build A Populated Passage Inventory
Consider a fictional Spanish setup guide for a product whose current interface uses English labels. A qualified language reviewer would need to approve the actual Spanish. The following snippets are deliberately short teaching examples, not a full translation or instructions for a real service.
| Region | Example content | Language decision | Why |
|---|---|---|---|
| Document | Spanish explanatory prose | Default lang="es" | Spanish is the main language |
| Quoted support sentence | “Select the workspace before continuing.” | Passage lang="en" | A complete English instruction |
| Interface button | “Create workspace” | Review as preserved English UI phrase | Reader must find that exact visible control |
| Command | tool --workspace SAMPLE | Treat as code/technical identifiers | Not an English prose paragraph |
| Product name | Fictional product proper name | Proper-name exception reviewed | Do not invent a spoken translation |
| Spanish continuation | “Continúe con el siguiente paso.” | Return to inherited Spanish | English declaration must not leak into it |
| Help link | “Read the English setup guide” | English phrase identified where needed | Destination language should be understandable |
The interface phrase needs a real language decision, not a blanket rule that everything inside quotation marks is exempt. Technical terms and proper names have stated exceptions; an ordinary sentence does not become technical because it appears on a documentation page.
Keep The Markup Boundary Small
For the fictional complete English sentence, a scoped fragment might be:
<html lang="es">
<body>
<p>Nota de soporte:</p>
<blockquote lang="en">Select the workspace before continuing.</blockquote>
<p>Continúe con el siguiente paso.</p>
</body>
</html>This is illustrative source, not an embedded page or production component. The closing blockquote restores the inherited document language for the following paragraph. An English declaration placed around the entire article would mislabel that continuation.
Do not mechanically label all code as English. A command token is not equivalent to explanatory prose. Preserve technical spelling so a language repair does not change an executable example. The code-copy contract provides the separate exact-string check.
Verify More Than An Attribute's Presence
Inspect the final document element and the intended passage boundaries. A template may use the site's default language despite rendering a localized article. A rich-text editor may remove a passage attribute or wrap too much content after an edit.
Include a negative case in the fixture: extend the English wrapper over the following Spanish paragraph. The expected check should identify that specific boundary error. A test that only counts language attributes can pass a wrongly scoped declaration.
Then examine actual reading with the relevant browser and assistive technology. Language metadata allows the user agent to select appropriate processing; it does not guarantee that every installed voice, pronunciation or proper name will sound ideal. Save the environment and the observed behavior rather than claiming universal support.
Keep Interface Truth And Translation Together
When the product interface changes its button wording, update the guide's preserved label or explain the new control. Do not silently translate a label that the reader must locate in an English interface. If the product supports a localized interface, specify which interface state the guide assumes.
A screenshot containing an English label needs the same applicability review. Correct prose language metadata cannot fix a screenshot from a different product version. The instructional screenshot review supports that separate identity and safety task.
Check downloads and linked instructions. A Spanish introduction that sends readers to an unannounced English prerequisite is an incomplete journey even if every current attribute is correct. Explain necessary language transitions in ordinary content where they affect the task.
Avoid False Search Conclusions
The page's language metadata is not the same thing as reciprocal alternate-URL annotations. Do not “fix” localized search configuration by changing a passage attribute, or claim that adding lang makes a market ready for launch.
Use the localized claim review to preserve product limitations across languages. A language attribute cannot establish that a pricing promise, supported region or technical instruction remains equivalent.
For a multilingual page with no simple dominant language, use the documented guidance and a qualified reviewer rather than guessing from the first navigation label. Record the chosen default and the actual passage map so another maintainer can reproduce the decision.
Save A Language Boundary Receipt
Keep the document revision, declared default, passage inventory, exceptions and reasons, final markup boundaries, language reviewer and actual assistive-reading observations. Recheck after template, editor or localization changes. The fictional inventory is complete enough to reveal which owner must approve each region.
Release when the relevant language is programmatically identifiable at the reviewed scope and the instructions remain accurate for the specified interface. This is one part of a useful multilingual public guide. It does not establish complete accessibility, translation quality for an entire corpus or improved external rankings.
