Language Codes, Text Properties, and Speakable Section Markup
When to use inLanguage, availableLanguage, and speakable in structured data, BCP 47 codes, and how text properties differ on pages and media.
Most of this cluster comes from Schema.org definitions for language and text on the web, plus Google’s speakable structured data requirements. Together they answer how to tag the language of content, which text fields mean what, and how to point assistants at the parts of a page that should be read aloud. Video caption workflows (for example Cloudflare Stream captions) use the same ISO-style language codes but serve a different purpose than page-level inLanguage.
Language codes (BCP 47): one standard across properties
Section titled “Language codes (BCP 47): one standard across properties”Schema.org language-related properties ask for IETF BCP 47 tags (often a short ISO 639-1 code such as en or es, sometimes with region or script subtags).
The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. See also availableLanguage.
— Schema.org, inLanguage
The same BCP 47 requirement appears on availableLanguage, knowsLanguage, and subtitleLanguage. The Language type describes natural languages (Spanish, Tamil, Hindi, English, and so on); formal tags can be carried in alternateName.
For day-to-day picking of codes, provider docs often list frequent ISO 639-1 values. Perplexity’s language filter documentation lists pairs such as English en and Chinese zh; Cloudflare Stream’s caption list uses the same style (en for English, ja for Japanese). Those lists are subsets; the normative reference for markup remains BCP 47 on the Schema.org property pages.
inLanguage, availableLanguage, knowsLanguage, and subtitleLanguage
Section titled “inLanguage, availableLanguage, knowsLanguage, and subtitleLanguage”Each property answers a different question. Use the wrong one and consumers may treat your page as monolingual when you only meant “we also offer support in French,” or mark a person’s skills when you meant the article language.
| Property | Typical question | Used on (examples) |
|---|---|---|
| inLanguage | What language is this content in? | CreativeWork, Event, BroadcastService, PronounceableText |
| availableLanguage | What language can someone use at this place or channel? | ContactPoint, Course, LodgingBusiness, ServiceChannel, TouristAttraction |
| knowsLanguage | What language does this person or organization know? | Person, Organization |
| subtitleLanguage | In which languages are subtitles or captions available? | Movie, TVEpisode, BroadcastEvent, ScreeningEvent |
A language someone may use with or at the item, service or place. Please use one of the language codes from the IETF BCP 47 standard. See also inLanguage.
— Schema.org, availableLanguage
Of a Person, and less typically of an Organization, to indicate a known language. We do not distinguish skill levels or reading/writing/speaking/signing here. Use language codes from the IETF BCP 47 standard.
— Schema.org, knowsLanguage
The older language property (a sub-property of instrument on actions) is superseded; prefer inLanguage on PronounceableText and related types per the version 30.1 summary.
Language type and ComputerLanguage (natural vs programming)
Section titled “Language type and ComputerLanguage (natural vs programming)”Natural human languages and programming languages are separate types so markup does not confuse “English article about Python” with “source code written in Python.”
Natural languages such as Spanish, Tamil, Hindi, English, etc. Formal language code tags expressed in BCP 47 can be used via the alternateName property. The Language type previously also covered programming languages such as Scheme and Lisp, which are now best represented using ComputerLanguage.
— Schema.org, Language
This type covers computer programming languages such as Scheme and Lisp, as well as other language-like computer representations. Natural languages are best represented with the Language type.
— Schema.org, ComputerLanguage
Use programmingLanguage on SoftwareSourceCode with a ComputerLanguage (or text) value—not inLanguage on the code block unless you are describing locale of comments or documentation strings.
Text properties: page body, comments, captions, and transcripts
Section titled “Text properties: page body, comments, captions, and transcripts”Schema.org splits text by role. The generic text property is “the textual content of this CreativeWork.” More specific properties avoid overloading one field.
| Property | Meaning | Typical context |
|---|---|---|
| text | Main textual content of a creative work | CreativeWork |
| commentText | Body of a user comment | UserComments |
| embeddedTextCaption | Text captioning on a media object (e.g. meme text) | MediaObject |
| transcript | Transcript of audio or video | AudioObject, VideoObject |
| lyrics | Words of a song | music media |
| utterances | Spoken words at a section of media | HyperTocEntry |
The version 30.1 index also ties caption on AudioObject / ImageObject / VideoObject to visible or downloadable captions; for machine-readable subtitle files, Schema.org points to MediaObject and encodingFormat rather than duplicating file bytes in JSON-LD.
For pronunciation markup, PronounceableText bundles textValue, phoneticText (e.g. IPA for Houston: /ˈhjuːstən/), speechToTextMarkup (e.g. SSML or IPA), and inLanguage.
Headlines and answers in other structured data types
Section titled “Headlines and answers in other structured data types”When you mark up forums or Q&A, text fields have display rules outside Schema.org core types. Google’s DiscussionForumPosting guidance says the post headline should be the title—and you should not duplicate or truncate body text into a headline if there is no real title. For QAPage, the text of an answer should be the full answer; partial markup can prevent correct display.
speakable: marking sections for text-to-speech
Section titled “speakable: marking sections for text-to-speech”The speakable property on Article or WebPage marks sections “particularly appropriate for text-to-speech conversion,” not every paragraph on the page.
Indicates sections of a Web page that are particularly ‘speakable’ in the sense of being highlighted as being especially appropriate for text-to-speech conversion. Other sections of a page may also be usefully spoken in particular circumstances; the ‘speakable’ property serves to indicate the parts most likely to be generally useful for speech.
— Schema.org, speakable
Schema.org allows three content-locator styles: (1) id-valued URL fragments on the page, (2) cssSelector on a SpeakableSpecification, (3) xpath. Values use dedicated types CssSelectorType and XPathType (listed among pending Schema.org terms).
Google’s speakable implementation narrows the choice for SpeakableSpecification:
Use either cssSelector or xPath; don’t use both.
Example shape with cssSelector:
"speakable": { "@type": "SpeakableSpecification", "cssSelector": [ ".headline", ".summary" ]}Example with xPath (from the same Google page):
"speakable": { "@type": "SpeakableSpecification", "xPath": [ "/html/head/title", "/html/head/meta[@name='description']/@content" ]}CssSelectorType is defined as “text representing a CSS selector”; multiple DOM matches can represent one conceptual WebPageElement. The same rule applies to xpath on SpeakableSpecification.
Common conclusion: Schema.org describes what speakable means and three locator mechanisms; for Google’s speakable feature, attach SpeakableSpecification to Article or WebPage, include required properties per Google’s speakable documentation, and pick one of cssSelector or xPath per specification object.
Choosing selectors for speakable content
Section titled “Choosing selectors for speakable content”Prefer stable selectors on the main summary or headline, not chrome or ads. Cloudflare Web Analytics Core Web Vitals documentation uses CSS selectors to name DOM nodes in diagnostics (document.querySelector(...)); the same selector discipline applies: identifiers must resolve to the content you intend to highlight.
Video captions and API language fields
Section titled “Video captions and API language fields”Structured data subtitleLanguage describes availability of subtitle languages on a creative work. Uploading caption tracks to a video API is separate: Cloudflare Stream returns caption metadata such as language, human-readable label, whether the track was generated, and status (for example ready) when you add or update a caption. Use the same style of short codes (en, es, …) consistent with your BCP 47 strategy, and keep JSON-LD subtitleLanguage aligned with tracks you actually publish.
Common mistakes
Section titled “Common mistakes”- Using full language names (
"English") where BCP 47 codes ("en") are required on inLanguage and siblings. - Putting programming language names on Language instead of ComputerLanguage / programmingLanguage.
- Marking service languages with
inLanguageinstead of availableLanguage on a hotel, course, or contact point. - Stuffing entire articles into speakable instead of a concise speakable summary block.
- Supplying both
cssSelectorandxPathon oneSpeakableSpecificationwhen targeting Google speakable eligibility. - Confusing text on a
CreativeWorkwith commentText, transcript, or visible caption on media—each has a distinct type and consumer.
How to check this on your site
Section titled “How to check this on your site”-
Open your JSON-LD or microdata and confirm every language field (inLanguage, availableLanguage, knowsLanguage, subtitleLanguage) uses BCP 47 tags as stated on those property pages.
-
Trace each text-related property to the visible or published equivalent (body, comment, transcript, caption file) so values are complete, especially Q&A text per QAPage and forum headline rules per DiscussionForumPosting.
-
For speakable markup, validate
SpeakableSpecificationagainst Schema.org speakable and Google’s speakable requirements, including using onlycssSelectororxPathper object. -
For hosted video, compare caption
languagevalues from your stream API (see adding captions) withsubtitleLanguagein structured data. -
You can check automatically in Answerwell (our tool): https://answerwell.org/workspace
Report an error or ask a question
Section titled “Report an error or ask a question”If something on this page is wrong or unclear, email yimasynthetic@gmail.com with the page URL and the exact sentence you are asking about, and we will look into it.