• Resolved Joe Hana

    (@joehana)


    Hi,

    first of all many thanks for that great plugin. It works really good.

    I still have a question tough: If I have a plugin which doesn’t have any translation files included nor has a template file (pot) the plugin offers to add a pot file on a specific path – how does that path get determined?

    In my specific case I have created a plugin and want to add a pot file to it but the plugin tries to add this file in wp-content/plugins/pluginname/pluginname/lang instead of simple wp-content/plugins/pluginname/lang – is this a bug from the plugin or is this something I need to set?

    Many thanks in advance

Viewing 5 replies - 1 through 5 (of 5 total)
  • i dont know

    Plugin Author Tim W

    (@timwhitlock)

    If Loco has no other information it will offer a path of <plugin_root>/<text_domain>.pot, although the preferred/standard path would be <plugin_root>/languages/<text_domain>.pot. Adding /languages as the DomainPath header in your plugin will ensure this is offered.

    Without seeing your plugin I can’t say how it arrived at that strange path, except that “lang” is not one of Loco’s defaults so it must have been pulled from somewhere. Did you specify a DomainPath header?

    Generally I’d recommend you follow a standard layout and add a loco.xml file if you need to do anything more exotic. See https://localise.biz/wordpress/plugin/authors

    Thread Starter Joe Hana

    (@joehana)

    Hi Tim,

    thanks for the quick reply.

    My Plugin Header looks like:

    
     *
     * Text Domain: 	custom-users
     * Domain Path: 	custom-users/lang
     *
    

    But I’ve changed the Domain Path Part now to be only /lang but still I get this weird path. Does Loco store/cache this somehow?

    I actually doesn’t need nor want to make anything exotic. I still struggle with that Translation Thing for a while altough I thought I now have a clue about. I just want a straight forward method which simply works. ??

    Thanks for any insights.

    Plugin Author Tim W

    (@timwhitlock)

    Your configuration won’t be cached unless you’ve saved it from the Advanced tab. If you’ve done that, then go into either the Advanced or Setup tabs and hit “Reset config”. Then every time Loco reads your plugin it will look at your headers, rather than the saved config.

    Thread Starter Joe Hana

    (@joehana)

    Great Tim – that did the trick. Can’t remember that I’ve saved the config from the advanced tab but maybe it happend once during all the testing. Thanks again ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Path to create POT File’ is closed to new replies.