Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,
    you need first to declare your new string using the pll_register_string function:
    pll_register_string(‘group’, ‘string-name’);

    And integrate it where you want to see it displayed in your theme, using the pll_e function:
    pll_e(‘string-name’,’group’);

    For instance:
    In my functions.php:
    if (function_exists(‘pll_register_string’)) {
    pll_register_string(‘wpnotification’, ‘message’);
    }

    and in my header.php
    pll_e(‘message’,’wpnotification’);

    in wordpress admin (language -> strings translation):
    English: “my message in english”
    French: “my message in french”

    Thread Starter vladicorp

    (@vladicorp)

    Great , it worked excellent.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to add custom strings based on plug-ins’ is closed to new replies.