Support » Plugin: WP Content Protection » Internationalisation

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Shankaranand Maurya

    (@shankaranand12)

    Hi,
    Thanks for taking interest of my plugin.
    Yes,I want to do this.Can you help me how can I do it ?

    Thanks,

    Actually, this is pretty simple.

    First step :
    In your main plugin file, where you put the description, you add the text domain :

    /*
    * Plugin Name: My plugin
    * Author: You
    * Text Domain: plugin-domain
    */

    use the php function __() to put your strings in it, and create .pot file to make your translated strings.

    Example :

    $lang = “english”;
    sprintf __(“my %s string”, $lang, ‘plugin-domain’);

    This is a simple example, you can find more in the codex and with google 🙂

    If you need a hand don’t hesitate 😉

    EDIT : have a look here, it will be a start : http://codex.wordpress.org/Function_Reference/_2

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Internationalisation’ is closed to new replies.