Forums

Site with multilanguage (qTranslate) (2 posts)

  1. hrach
    Member
    Posted 6 months ago #

    Hello,

    I use plugin 'qTranslate' to create site with multi language. I've managed to translate static texts using poedit.

    For dynamic texts (WordPress, plugins, themes) I decided to use the following hacks:
    File: index.php (original version)
    define('WP_USE_THEMES', true);
    require('./wp-blog-header.php');

    File: index.php (updated version)
    define('WP_USE_THEMES', true);
    ob_start();
    require('./wp-blog-header.php');
    $result = ob_get_contents();
    ob_end_clean();
    echo __($result); // gettext usage

    And then I use the below mentioned to translate the texts:
    [:en]English text[:HY]Armenian texts

    It works nice for Armenian.
    When I switch English language the text is replaced to English but the page is displayed partly till this 'English text'. The rest of html code is not displayed.

    I am a beginner in the WordPress. Please help me to resolve the issue.

    Thanks,
    Hrach

  2. hrach
    Member
    Posted 5 months ago #

    I've resolved my issue replacing the following string

    [:en]English text[:HY]Armenian texts

    with this one

    <!--:en-->English text<!--:--><!--:HY-->Armenian texts<!--:-->

    Although I don't know the difference.

Reply

You must log in to post.

About this Topic