David Darnes 2/24/2020

Page translations and multi-language selects

Read Original

This article explains the technical challenges of multi-language websites and provides a solution using HTML's <link rel="alternate" hreflang="..."> elements to define page translations for search engines. It then details a practical JavaScript method to build an accessible language select dropdown by reading these link elements from the page's head, complete with a linked CodePen example.

Page translations and multi-language selects

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

No top articles yet