WordPress.org

Ready to get started?Download WordPress

Forums

Loco Translate
[resolved] Different textdomain than plugin folder (4 posts)

  1. Jimmy
    Member
    Posted 3 months ago #

    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/

  2. timwhitlock
    Member
    Plugin Author

    Posted 3 months ago #

    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.

  3. Jimmy
    Member
    Posted 3 months ago #

    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.

  4. timwhitlock
    Member
    Plugin Author

    Posted 3 months ago #

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

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.