I published my first plugin (https://wordpress.org/plugins/multi-google-analytics/) on WordPress.org and I get this notice about it not being prepared for localization, even though it's perfectly translated when I use it in the admin.

I've read through the how to internationalize your plugin guide and I can't put my finger on anything missing from the plugin.

My plugin is structured as follows:

── lang/
│   ├── ahr.pot
│   ├── ahr-da_DK.po
│   ├── ahr-da_DK.mo
├── plugin-file.php

I have the follow WP Plugin meta in the plugin file:

Plugin Name: Multiple Google Analytics
Plugin URI: {uri...}
Description: {desc...}
Version: 1.0.0
Text Domain: ahr
Domain Path: /lang
License: GPL v3

I'm loading the textdomain like this:

add_action('plugins_loaded', function() {
  load_plugin_textdomain( 'ahr', false, basename( dirname( __FILE__ ) ) . '/lang/' );

Any idea what might be missing? Again, the plugin IS actually translated and the strings update when I change the locale in the admin. It's just on WordPress.org that I get the notice it isn't localization ready.

1 Answer 1


It turns out the text domain has to match the plugin slug on wordpress.org. After changing the plugin text domain to multi-google-analytics the notice went away.

  • 1
    Great you found it. For future reference it would be nice if you provided a link to the requirement and maybe a little more explanation. Also, please accept your own answer, so the system registers this question as solved.
    – cjbj
    Nov 2, 2016 at 19:35
  • 1
    Of course. Added a link to the docs mentioning the requirement. I have to wait 2 days before I can accept my own answer.
    – Ahrengot
    Nov 2, 2016 at 23:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.