Install
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.zipNo 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
- Upload the ZIP via Plugins → Add New → Upload Plugin and activate it.
- Edit a post or page: use the Page language (HTML lang) metabox to pick a locale.
- 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.