The World Wide Web Consortium publishes draft guidance on language and text direction metadata
The World Wide Web Consortium has published draft guidance on identifying the language and reading direction of text stored and exchanged through web data formats.
The World Wide Web Consortium (W3C) published the first public working draft of Strings on the Web: Language and Direction Metadata on 16 July 2026.
Prepared by the W3C Internationalization Working Group, the document sets out recommended practices for identifying the language of text strings and whether they should be read from left to right or right to left.
The guidance focuses partly on formats such as JSON and WebIDL, which do not provide the same built-in language and direction information available in markup formats such as HTML and XML. Without this information, text may be displayed or processed incorrectly.
The draft recommends that every field containing natural-language text should make it possible to determine both the language and the direction of that specific string. It favours explicit information attached to the string or document rather than relying mainly on automated guessing.
For individual text fields, the document proposes structures containing the text itself, a language tag and a direction value. It also recommends document-wide defaults where appropriate, while allowing individual strings to override them.
Applications receiving the information should use it when displaying or processing text and should separate inserted strings from surrounding text to prevent formatting problems, particularly when left-to-right and right-to-left scripts appear together.
The publication is an early draft on the W3C Recommendation track. It does not represent formal endorsement by W3C members and may be revised, replaced or withdrawn as the work develops.
