• Resolved tamo1899

    (@tamo1899)


    Hello,

    I think your plugin might be the perfect choice, but i unfortunately have one major issue i can’t resolve. So, i have a lot of gettext strings in my parent theme, but i want to create the POT/PO/MO files and save them inside the childtheme folder.

    For example, i have:

    – Parent Theme
    – Child Theme 1
    – Child Theme 2

    inside the loco translation overview and when i create a template or language file for the parent theme everything works fine. But when i try to create a lang. or template file for my child theme, the string search function doesn’t find any strings. Now is my question, it is possible to use the parent theme gettext strings for my child theme with loco translate?

    I know that i can just copy the parent theme pot file inside my child theme directory, but this is not an option because i am really need the included sync function from the plugin. I tried something like include the textdomain from the parent theme inside the child theme style.css, but it had no effect.

    Thanks your any help

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Tim W

    (@timwhitlock)

    If you copy the POT file the Sync function will sync your PO with the POT, not with the source code.

    Source code is only used for syncing PO files when there is no POT.

    If you need to keep your copied POT file in sync with the parent theme’s source then that’s not currently possible because the php files are under a different directory tree. If you need to do that you’d have to symlink your file, rather than copy it.

    I hope this solves your issue. If not, I’m going to need to understand it better.

    Thread Starter tamo1899

    (@tamo1899)

    Thanks for your reply, i guess making a symlink might be a good idea.

    I dont really know if i need a POT file for the symlink approach, because
    I actually just need to sync the PO/MO files inside my child theme with my parent theme source code.

    Plugin Author Tim W

    (@timwhitlock)

    Can I mark this as resolved?

    Thread Starter tamo1899

    (@tamo1899)

    Hi Tim,

    We tried your idea with making a symlink of the parent POT file to the childtheme and we actually could create a new po/mo file inside the childtheme from the linked POT File. Unfortunately the sync function didn’t worked, so we decided to use a different plugin.

    Anyway, thanks for your help!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘create translation files for parent theme inside childtheme dir’ is closed to new replies.