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

1
The Beautiful Web
Jens Oliver Meiert 2 votes
3
LLM Use in the Python Source Code
Miguel Grinberg 1 votes
4
Wagon’s algorithm in Python
John D. Cook 1 votes