Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Can you re-run the lanuage pack off the latest release of the plugin? I fixed the error of “Undefined constant” and changed so that it would be usable with language packs.

    Thread Starter midxcat

    (@midxcat)

    Sure, I updated the zip.

    * Add “Domain Path” to plugin header to translate plugin description.
    * Add load_plugin_textdomain to load the language files and expect the files will be put in languages dir.

    By the way, I create .pot file using wordpress-i18n tools and it slightly different from yours so I attached it in the zip file.

    Plugin Contributor Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Domain Path for languages is optional.

    http://ottopress.com/2013/language-packs-101-prepwork/

    If you want to use language packs exclusively (note: WP will still check the base /wp-content/plugins directory for language files, just in case):

    Text Domain: plugin-slug
    load_plugin_textdomain( 'plugin-slug' );

    So really all you’d do is make a folder wp-content/languages/plugins/varnish-http-purge and toss the files in there. That way you don’t lose ’em when you upgrade. (I’m adding in the load_plugin_textdomain call mind you). I really want to get away from me having to put the languages in the plugin, since that puts a lot of weight on you the translator.

    I tossed the files here: https://github.com/Ipstenu/varnish-http-purge/tree/master/languages

    So if you want to do pull reqs etc to update them for the masses that’ll be perfect 🙂 It’s not great, I know, but this way when language packs are ready, I won’t have to undo and redo.

    Thread Starter midxcat

    (@midxcat)

    Thank you for the information. I didn’t know the language packs feature.

    But when I put the language files in the wp-content/languages/plugins/varnish-http-purge, it didn’t work.

    Here is the solution:

    * Add load_plugin_textdomain( 'varnish-http-purge' ); to the plugin file
    * Put the translation files into wp-content/languages/plugins/, no need to create nested directory.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Japanese translation’ is closed to new replies.