Sometimes, you want to write articles on your blog in another language than your default language. But your WordPress still outputs your default language as the HTML lang attribute, even though the language of your article does not match that language setting.
Here is where my WordPress plugin „CH Simple Post Language“ kicks in.
What does this plugin do exactly?
Well, it’s pretty easy. Once your in the edit screen of your post or page, you will see a so called meta box in your WordPress admin sidebar.
In this dropdown, you can select a language to be output as the HTML lang attribute in your site’s header for this page or post only. All other pages and posts will have the default HTML lang attribute – unless you have set a different language for them as well.
Demo: Just check the source of this page, It says <html lang=“en“>, while most of my other articles and pages are in german and outputting the standard language set in my WordPress installation, which is „de“.
Don’t worry, you don’t have to scroll through all the languages.
To make life a bit easier, you can access a settings page for this plugin to set which languages should be shown in the dropdown select box.
If you don’t select any language, all languages will be shown by default.
Is it free?
Yeah, it’s free! Use it, have fun with it, and if you have any recommendations for future development, send me an email to firstname.lastname@example.org.
Download the plugin
You can download the plugin from the WordPress plugin repository or directly from your admin section of your WordPress installation.
Either search for „CH Simple Post Language“ or download it from the repo:
„Damn, this is nice. I want to donate“, you say?
If you’d like to donate a beer or something: Feel free to do so. My PayPal is: email@example.com.