Prepare a website for other languages and right-to-left text
8 steps · about 1 h 2 min · Beginner
- Learn what internationalization and localization mean (article, W3C Internationalization, 6 min)
Separates the code work from the translation work.
- Declare the page language in HTML (article, W3C Internationalization, 8 min)
Shows where lang goes and why screen readers and fonts need it.
- Choose the right language tag for each locale (article, W3C Internationalization, 8 min)
Explains BCP 47 tags such as en-GB and zh-Hant.
- Apply the lang attribute to mixed-language content (reference, MDN Web Docs, 4 min)
Covers inheritance and marking inline foreign phrases.
- Set text direction for Arabic and Hebrew pages (article, W3C Internationalization, 8 min)
Shows when to use dir on html versus inline elements.
- Replace left and right in CSS with logical properties (reference, MDN Web Docs, 8 min)
Lets one stylesheet mirror correctly for right-to-left layouts.
- Design layouts that survive longer and mirrored text (tutorial, web.dev, 10 min)
Covers spacing and layout choices that break under translation.
- Link translated pages with hreflang (reference, Google Search Central, 10 min)
Helps search engines show each visitor the right language.