Skip to content

.tip

· one of the small things

Mark a foreign phrase with lang, not just the document

A screen reader takes its pronunciation from lang, so an English phrase inside a Turkish page is read with Turkish vowels until you say otherwise. html carries the page, a span the exception.

<html lang="tr">
  <p>Yeni <span lang="en">feature flag</span> paneli yayında.</p>
</html>

The same attribute picks the dictionary hyphens: auto breaks words with, the quotes q draws, and whether the browser offers to translate. A wrong value is worse than a missing one, so keep the page's lang on the text you ship, not your admin panel's locale.

accessibilityi18n