Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Neighborhood › Help to translate some sentences with WPML
New Landing › How can we help? › Themeforest Theme Support › Neighborhood › Help to translate some sentences with WPML
- This topic has 14 replies, 3 voices, and was last updated 7 years by Mohammad – SUPPORT.
-
Posted in: Neighborhood
-
September 28, 2016 at 10:23 am #293626
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.
CarlosAttachments:
You must be logged in to view attached files.September 29, 2016 at 8:10 am #293737Hi,
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
MohammadSeptember 29, 2016 at 2:19 pm #293803Mohammad,
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)
September 29, 2016 at 2:25 pm #293805Hi,
Please leave the wordpress to update and you can update all things beside it.
Thanks
MohammadSeptember 29, 2016 at 2:54 pm #293811Hellow 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?
September 29, 2016 at 4:49 pm #293830Hi,
Which code had been given by me at last time to fix translation?
Thanks
MohammadSeptember 29, 2016 at 8:10 pm #293854To 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;
}
?>September 30, 2016 at 9:52 am #293886Hi,
Please contact to WPML to resolve this issue.
Thanks
MohammadSeptember 30, 2016 at 10:25 am #293898Hi,
Please remove the code as you ar using for translation and translate the string here.
Thanks
MohammadSeptember 30, 2016 at 10:36 am #293899Ok, Mohammad, it works. Thank you.
What about the other issue described in the beginning of the topic?
Thank you very much for your help.
CarlosSeptember 30, 2016 at 11:34 am #293910Hi,
Have you translated all strings in Spanish and English?
Thanks
MohammadSeptember 30, 2016 at 11:46 am #293912Hi 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.
CarlosAttachments:
You must be logged in to view attached files.October 3, 2016 at 12:26 pm #294171Hi,
Please contact WPML support and report this issue: https://wpml.org/forums/forum/english-support/
Thanks.
October 4, 2016 at 10:15 am #294317Ok, I´ll do.
Thank you
October 5, 2016 at 5:14 am #294430Hi,
Let us know the feedback.
Thanks
Mohammad -
Posted in: Neighborhood
You must be logged in and have valid license to reply to this topic.