New Landing How can we help? Themeforest Theme Support Neighborhood Help to translate some sentences with WPML

Viewing 15 posts - 1 through 15 (of 15 total)
  • #293626
    csmartgm
    Member
    Post count: 22

    Hello,
    I have made my web page in Spanish as a main language, and now I am trying to make it multilingual with the help of WPML. For the moment I am making the translation into English and I am finding problems to translate some sentences. In particular, I don´t know how /where to translate the following sentences:
    – “Categoría de los productos” (see picture nr1 attached)
    – “Añadir al carro” (see picture nr2 attached)
    I have to point out that this last sentence, originally in English, was modified when I was making the page in the Spanish, with the help of Mohammad. The sentence was translated into Spanish by adding a code to the functions.php file ( see my topic in the forum, titled: “How to translate a sentence from the Product description page). The question, now is that I want the Spanish version of this sentence when the chosen language is Spanish, but obviously I want it in English when the client selects the English version.

    Thank you in advance, and best regards.
    Carlos

    Attachments:
    You must be logged in to view attached files.
    #293737
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please upgrade all themes and plugin first after translate the strings through Admin > WPML > String translations. If you still face any problem then let me know.
    Thanks
    Mohammad

    #293803
    csmartgm
    Member
    Post count: 22

    Mohammad,

    Is it also convenient to update WP to 4.6.1 (actually I have the 4.5.3)?. I am worried about the possibility to have some incompatibility with the theme or some plugin.

    (Any case, I have made a backup with x-cloner)

    #293805
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please leave the wordpress to update and you can update all things beside it.
    Thanks
    Mohammad

    #293811
    csmartgm
    Member
    Post count: 22

    Hellow again,

    I have updated WP themes and plugings, but I am exactly in the same situation as described in my previous mail.

    What should I do now?

    #293830
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Which code had been given by me at last time to fix translation?
    Thanks
    Mohammad

    #293854
    csmartgm
    Member
    Post count: 22

    To translate “Add to shopping cart” by “Añadir al carro”, the code was:

    <?php
    add_filter( ‘gettext’, ‘sf_addcart_translate’, 20, 3 );

    function sf_addcart_translate( $translated_text, $text, $domain ) {

    switch ( $translated_text ) {

    case ‘Add to Shopping Bag’ :

    $translated_text = __( ‘A単adir al Carro’, $domain );
    break;

    }

    return $translated_text;
    }
    ?>

    #293886
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please contact to WPML to resolve this issue.
    Thanks
    Mohammad

    #293898
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please remove the code as you ar using for translation and translate the string here.
    Thanks
    Mohammad

    #293899
    csmartgm
    Member
    Post count: 22

    Ok, Mohammad, it works. Thank you.

    What about the other issue described in the beginning of the topic?

    Thank you very much for your help.
    Carlos

    #293910
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Have you translated all strings in Spanish and English?
    Thanks
    Mohammad

    #293912
    csmartgm
    Member
    Post count: 22

    Hi again,

    The problem is that when I go to Translation of Stings, and I look for “Categorías de los productos”, Ifound the string but when I try to make the translation, the only language that I find is the Spanish. Look at the picture attached.

    Thank again for your help.
    Carlos

    Attachments:
    You must be logged in to view attached files.
    #294171
    David Martin – Support
    Moderator
    Post count: 20834

    Hi,

    Please contact WPML support and report this issue: https://wpml.org/forums/forum/english-support/

    Thanks.

    #294317
    csmartgm
    Member
    Post count: 22

    Ok, I´ll do.

    Thank you

    #294430
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Let us know the feedback.
    Thanks
    Mohammad

Viewing 15 posts - 1 through 15 (of 15 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register