Skip to:
Content
Pages
Categories
Search
Top
Bottom

localizing plugins

  • Hi,

    I’ve localized a plugin with

    $ xgettext --keyword=__ --keyword=_e -j --from-code=UTF-8 -o plugin.pot *.php

    I translated it all and made the .mo file from the .po

    $ msgfmt plugin-it_IT.po -o plugin-it_IT.mo

    Now, what I have to write in the plugin file? With this line the plugin outputs in english, instead of italian:

    load_plugin_textdomain('onlinelist','my-plugins/');

Viewing 3 replies - 1 through 3 (of 3 total)
  • I tried that also.

    but cannot succeed, any clue?


    Sam Bauers
    Participant

    @sambauers

    If you go into the plugin browser on this site and then go to the admin area of your plugin you will find some localization tools on that page.

    One will add a textdomain to a PHP file that you upload, the other will generate a POT file from any of your tagged versions in the subversion repository.

    All calls of functions “__()” and “_e()” should be with textdomains.

    For example

    _e('Hello!', 'onlinelist');

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar