WordPress.org

Ready to get started?Download WordPress

Forums

Subscribe To Comments Reloaded
[resolved] Multi language message (3 posts)

  1. Iznogood1
    Member
    Posted 11 months ago #

    Hi,

    I manage a site in 2 languages with

    <html <?php language_attributes(); ?> xmlns="http://www.w3.org/1999/xhtml">

    in the header.

    Is it possible to display the message next to the "Notify me " checkbox (Notify me...) in the right language (set by the header) and not the one written in the settings ?

    Thanks

    http://wordpress.org/extend/plugins/subscribe-to-comments-reloaded/

  2. jonathanappleseed
    Member
    Posted 9 months ago #

    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...';
    } ?>
  3. Iznogood1
    Member
    Posted 9 months ago #

    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.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.