Prepare a website for other languages and right-to-left text

8 steps · about 1 h 2 min · Beginner

  1. Learn what internationalization and localization mean (article, W3C Internationalization, 6 min)

    Separates the code work from the translation work.

  2. Declare the page language in HTML (article, W3C Internationalization, 8 min)

    Shows where lang goes and why screen readers and fonts need it.

  3. Choose the right language tag for each locale (article, W3C Internationalization, 8 min)

    Explains BCP 47 tags such as en-GB and zh-Hant.

  4. Apply the lang attribute to mixed-language content (reference, MDN Web Docs, 4 min)

    Covers inheritance and marking inline foreign phrases.

  5. Set text direction for Arabic and Hebrew pages (article, W3C Internationalization, 8 min)

    Shows when to use dir on html versus inline elements.

  6. 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.

  7. Design layouts that survive longer and mirrored text (tutorial, web.dev, 10 min)

    Covers spacing and layout choices that break under translation.

  8. Link translated pages with hreflang (reference, Google Search Central, 10 min)

    Helps search engines show each visitor the right language.