WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Multi language message

[Resolved] Multi language message

Viewing 2 replies - 1 through 2 (of 2 total)
  • jonathanappleseed

    @jonathanappleseed

    If you’re using a multi-lingual plugin like WPML you will need to wrap your text in a gettext code. Example:

    <?php _e('Notify Me', 'yourtranslation'); ?>

    And then you will need to create a translation file (.po, .pot) for your theme.

    You can look into information on internationalizing your theme here.

    If that’s the only piece of text in your whole theme that you need to translate for some reason, then you could use this php code:

    <?php $mylocale = get_bloginfo('language');
    if($mylocale == 'fr-FR'){
    echo 'Informez-moi...';
    }
    elseif($mylocale == 'hr-HR'){
    echo 'Obavijesti me...';
    } else {
    echo 'Notify me...';
    } ?>
    Iznogood1

    @iznogood1

    Hi Jonathanappleseed,

    thanks for your support !

    That is what I have done ! Unfortunately as it modifies the plugin, this customization bill be lost if the plugin is updated.

    As I have developped a plugin (page navi slider), I have integrated a file called your-strings-to-translate.php available for user customization.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Multi language message’ is closed to new replies.