• Resolved Robert Skiba

    (@robertskiba)


    Hi guys,

    I’m having a big problem with Loco:

    My Plugin I urgently need to translate uses file extensions other than .php for the files to translate, by name: .phtml

    When I try to create a POT-File, loco only scans .php files, but so I only get nearly half of the needed strings to the pot file.

    Can you help me? Is there an option planned to configure the used file extensions for each plugin?

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

    (@timwhitlock)

    Hi. There is no planned option to make PHP file extensions configurable, but I’ll consider it if more people ask for it.

    For now, your options are either:

    Add each .phtml file explicitly into the bundle configuration’s “source file paths”. See https://localise.biz/wordpress/plugin/manual/bundle-config

    – or –

    Use alternative software to generate the POT file. Loco Translate will happily let you translate from POT files created via other tools.

    Thread Starter Robert Skiba

    (@robertskiba)

    Thank you for that advice.

    I had to use POEdit to generate the POT file, but I’m pretty sure that can’t be the solution.

    Maybe you should look which files other software uses as standards for PHP and other languages. POEdit uses .php, .php3, .php4 (really old endings!) and .phtml.

    Many plugin authors use the ending .phtml for templates. And that’s just the most cases to translate if you use those.

    Plugin Author Tim W

    (@timwhitlock)

    FYI: The latest development version has a new configurable option for this.

    You can now set something like “php phtml” in the plugin settings screen.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘File Extension other than .php’ is closed to new replies.