Managing your Clips‘ custom code translations is very simple with WP Clips. Firstly, when you install, update or upgrade the plugin, a new /languages/wp-clips.pot file is added, containing all translatable text within the plugin. But, what about the strings in your customizations? Well, here a couple of easy steps to follow:
- Use the ‘wp-clips’ text domain for translatable strings in your core and custom Clips. This is loaded by the plugin only once and is the most efficient way to manage your Clip translations.
- Update your wp-clips.pot file after any changes to your custom Clips or Precoded Clips, or when updating or upgrading the plugin.
- Update your ‘wp-clips.pot’ file either locally or remotely.
If installed locally, download and install the Poedit translation editor, open the wp-clips.pot file and ‘Update’ the wp-clips.pot file from its sources.
If installed remotely, you can either download a copy of your WP Clips plugin folder, update the file within the folder and then overwrite the file to the remote server. Or, if you wish to update via WordPress admin, install the Loco Translate plugin, go to ‘Manage Translations’, locate and click the wp-clips.pot file, then ‘Sync’ and ‘Save’.
Yup, it’s just that easy!
Helpful Resources
How to Internationalize Your Plugin – WordPress.org Plugin Handbook
I18n for WordPress Developers – WordPress.org Codex
Localization – WordPress.org Plugin Handbook