WP Manifestindependent plugin directory
manifest / i18n / html-lang-switcher

HTML Lang Switcher

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/semtio/html-lang-switcher/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

HTML Lang Switcher (Single Post/Page)

Select the HTML lang (and dir) per post or page. Adds a small metabox to choose a locale. Applies only on singular templates. Automatically disables itself when WPML or Polylang is active.

Installation

  1. Upload the ZIP via Plugins → Add New → Upload Plugin and activate it.
  2. Edit a post or page: use the Page language (HTML lang) metabox to pick a locale.
  3. Leave it blank to use the site default language.

Filters

  • hls_supported_post_types — change supported post types (default: post, page).
  • hls_supported_locales — add/remove locales shown in the dropdown.

Changelog

1.0.0

  • Initial release.