Localization is an important part of WordPress development as not everyone using WordPress speaks English (WordPress comes in different languages too).
Localization involves just a small amout of the extra work on your side, since the translation itself is usually done by volunteers (people who like and use your plugin).
You only need to provide some base files for translation, and don't be surprised when you start getting translated files sent to your inbox.
WordPress uses the GNU gettext localization framework, which is a standardized method of managing translations, and we will make use of it in our plugin.
We will start by defining our plugin as usual, and then add localization support.
Create a new folder called
post-types
.Create a new
post-types.php
file with the following content:<?php // pluginname Post Types // shortname PostTypes // dashname post-types /* Plugin Name: Post Types Version: 0.1 Plugin...