WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Different textdomain than plugin folder

[Resolved] Different textdomain than plugin folder

  • Example:

    I’m using the Google Analytics Dashboard for WP, which uses folder name google-analytics-dashboard-for-wp, but the textdomain is ga-dash.

    Loco Translate recognizes my locale files when they are in the plugins folder /languages. But if I where to move them to the global languages/plugins folder, Loco Translate do not recognize them at all. The translation still works of course, but I can’t edit them via Loco Translate, so I have to use poedit instead.

    Funny thing is, I have another plugin, WooCommerce PDF Invoices & Packing Slips, which also have different folder/textdomain, but in this case Loco Translate recognizes my locale files through the global languages folder…

    Is there a way to fix this?

    https://wordpress.org/plugins/loco-translate/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author timwhitlock

    @timwhitlock

    I’ve been having a lot of problems with plugins using a different name for their text domain. As a quick fix, try adding “Text Domain: ga-dash” to the plugin’s header comment block.

    I’m looking into a fix. Thanks for the example.

    That fix solved it, but I had to Sync the .pot file inside the plugin folder first. Before Sync still no locale shown from global folder.

    Perhaps we should encourage plugin authors to use this comment tag.

    Plugin Author timwhitlock

    @timwhitlock

    I’d encourage that as a matter of best practice.
    Thanks for the update.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Different textdomain than plugin folder’ is closed to new replies.