Skip to content
A quick WordPress plugin to show how to do internationalization in both PHP and JS in a WordPress plugin.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

I18n Example plugin

This plugin was created as an example to show working code for internationalization and localization in WordPress.

Hopefully, this will help serve as a learning tool on how WP handles translations.

Quick notes on language files

If you are including/compiling your own files, you will need to follow strict naming procedures.

  • MO files should be named {text-domain}-{locale}.mo
  • JSON files should be named {text-domain}-{locale}-{script-handle}.json

If you want, you may use a .po file editor such as PoEdit or similar to translate the .pot file into another language to test in WordPress.

Disclaimer: I only know very basic Slovak, as such translations may be inaccurate. Some were done with Google Translate. While my best attempts were made to properly translate the text (and avoid anything offensive), there may be inaccuracies. (Also, I know names are typically not translated, but I have too much fun with my name)

You can’t perform that action at this time.