• Hello! In my .php pages have a lot of texts ,what I want to translate, but I dont know how. Im using a polylang ,but that shows only widget titles and
    etc.

    For example ,I have
    <?php previous_posts_link('Newer Posts »'); ?>

    And I want to translate, Newer Posts in other language, but how I can do that?

    Thanks

    EDIT: I find this

    <?php
       wpml_e__if_language( 'text', 'lv' );
       wpml_e__if_language( 'text', 'en' );
    ?>

    but this code ,doesn’t help for that code what is above in my post

Viewing 11 replies - 1 through 11 (of 11 total)
  • You would need to upload the relevant translation file for your theme. What theme are you using? Where did you download it from?

    Thread Starter eatmailyo

    (@eatmailyo)

    esmi, I making my own theme.

    So why not change <?php previous_posts_link('Newer Posts »'); ?> to <?php previous_posts_link('Your translated string here »'); ?>?

    Thread Starter eatmailyo

    (@eatmailyo)

    esmi, I have a multilanguage page in 2 languages for now and I want to make for both languages

    There’s no way that you can add anything to the theme to display two languages simultaneously.

    Thread Starter eatmailyo

    (@eatmailyo)

    esmi, I dont want to display two languages simultaneously 😀
    I want to in one language shows one text ,in other language other text ,like translating. For example

    lv -> Text1
    en -> Text2

    And how will you determine which language any given visitor needs?

    Thread Starter eatmailyo

    (@eatmailyo)

    esmi, default language gonna be the international language ,what is English language.

    So how will people indicate that they need another language? And is all of this text for one specific page?

    Thread Starter eatmailyo

    (@eatmailyo)

    most of websites have 2-3 languages ,they have one international language ,what is English and who knows most of people in world.
    No I have a lot of pages ,where I need to do translations only for strings or html

    Multilingual WordPress sites usually rely upon a plugin. Perhaps you need to ask the developer of the multilingual plugin that you are using this question?

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Translate texts in HTML’ is closed to new replies.