• This topic has 17 replies, 4 voices, and was last updated 6 years ago by Marc.
Viewing 11 reply threads
  • Author
    Posts
    • #1759
      jbass
      Member

      Hi, I have translated the plugin in my language(Italian) with poedit, I have created piklist-it_IT.mo and piklist-it_IT.po files but the plugin still appare in english language. How can I activate my language?
      Thanks.

    • #1761
      Steve
      Keymaster

      @jbass– Is nothing translated or just somethings? Can you send a screenshot?

    • #1763
      jbass
      Member

      Nothing is translated.
      poedit screenshot
      wordpress screenshot

    • #1820

      @Steve – I translated Piklist for pt_BR and nothing changed too. Whats the problem?

    • #1823
      Steve
      Keymaster

      @darlantc– I think I solved the bug.

      Please open the file class-piklist.php and replace the load_plugin_textdomain line with:
      load_plugin_textdomain('piklist', false, 'piklist/languages/');

      Let me know if that works.

    • #1824
      jbass
      Member

      Great!!! It works!!!! Thank you

    • #1825
      Steve
      Keymaster

      Nice! It will be in the next version of Piklist.

    • #1826

      @Steve – Yes, great!

      You want the pt_BR.po file that I translated?

      Thank you!

    • #1831
      Steve
      Keymaster

      @darlantc– We’re really trying to get localization in a better place, and the next version of Piklist should be 99% localized. While we do want your po file, it will probably be incomplete due to all the changes. I can send you an updated POT file if you want.

    • #1832

      @Steve – Yes I want the updated POT when ready.

      Did you hear about the http://blog.glotpress.org/ ?
      I have translated some plugins that use GlotPress and is quite easy to update the PO file online before the new version goes live. With that you can invite everyone to help translating Piklist.

    • #1835
      Steve
      Keymaster

      @darlantc– I look the idea of Glotpress. I’ll look into installing. Will send you POT file when ready.

      • #5593
        Marc
        Member

        @Steve – Hi there,

        I’m making a website in French, and using a frontend contact form with Piklist.
        I saw that the validation strings weren’t translated.

        Long story short, I made a french .po file, but in order for it to work I have to override the plugin’s piklist-fr_FR.mo file. Which we will agree, is not a good way to do as on next update my changes will be lost.
        So I came across a solution to allow the language files to be overriden if you put the mo file in wp_content/languages/piklist/:

        In the file class-piklist.php

         
            // loads the user's file
            $domain = 'piklist';
            $mo_file = WP_LANG_DIR . '/' . $domain . '/' . $domain . '-' . get_locale() . '.mo';
            load_textdomain( $domain, $mo_file );
            // loads the plugin's file
            load_plugin_textdomain('piklist', false, 'piklist/languages/');
        

        I thought it could be quite useful to some users.

        Thanks again for an amazing plugin + support!

        Marc.

      • #5608
        Steve
        Keymaster

        @marcusig– Which version of Piklist are you using. The validation strings should be translatable.

      • #5609
        Marc
        Member

        I’m using v0.9.9.7. I also checked from the trunk download to be sure and it seems to be the latest version?

        The string is translatable, but the file piklist-fr_FR.mo doesn’t seem to have a full translation (also it weights 5kb against 32kb for the Spanish version).
        Which is ok of course, I know you guys are working hard to get v1 soon and probably don’t speak all the languages on Earth :).

        What I tried is to put my own piklist-fr_FR.mo in wp_content/languages/ to avoid overriding it in wp_content/plugins/piklist/languages/, which would be bad practice I think :).

        Which is what the load_textdomain( 'piklist', WP_LANG_DIR . '/piklist/piklist' . '-' . get_locale() . '.mo' ); allows.

      • #5611
        Steve
        Keymaster

        It would be best if you can add translations so everyone can benefit.

        You can easily translate here >

        Please translate the DEVELOPMENT VERSION.

      • #5621
        Marc
        Member

        @Steve

        What I’m also suggesting through that is to add flexibility to users who would like their own translated strings.
        Because Piklist will have such a broad range of usage, there will probably be people who would rather use their own translated string instead of the default one.
        But it’s only a suggestion.

        I’ll look into this link, I’ll gladly help.

    • #1836

      @Steve- Great, Thank you for the fast support and the awesome framework.

      • #5610
        Marc
        Member

        Well I should say it allow it when you insert it just before the line
        load_plugin_textdomain('piklist', false, 'piklist/languages/');

Viewing 11 reply threads
  • You must be logged in to reply to this topic.