Tagged: x
-
AuthorPosts
-
November 27, 2016 at 1:03 pm #1272320
canismundiParticipantHi,
I want to traduce visual things in the page.
I am using the Loco plugin.
I want to traduce some words like, The woocmoerce cart button text, and other words from learndash plugin.
I have made the tranlation, but some words are tranlated, and some are not.
I have read a lot , before asking. But no solution for me.
Please checkNovember 27, 2016 at 1:04 pm #1272323
canismundiParticipantThis reply has been marked as private.November 27, 2016 at 5:07 pm #1272485
RadModeratorThis reply has been marked as private.November 28, 2016 at 2:51 pm #1273654
canismundiParticipantThis reply has been marked as private.November 29, 2016 at 2:15 am #1274301
ChristianModeratorYou need to edit the page in Cornerstone and change the words manually in the Pricing Table element (see attachment). There’s no automatic way of translating that.
Thanks.
December 3, 2016 at 8:01 am #1279793
canismundiParticipantYes, I know. But I want to translate the cart. At the right corner, in the header. I translate the things with loco translate or directly in the child-theme or theme, but something forces the english words. You know? Appears in spanish just a half second and then chancges to english.
December 3, 2016 at 9:19 am #1279840
ThaiModeratorHi There,
Please add the following code under functions.php file locates in your child theme:
add_filter('ngettext', 'x_translate_carts' , 20, 3); function x_translate_carts( $translated_text, $single, $plural ) { $translation = array( '%s Item' => '%s Commentaire', '%s Items' => '%s Commentaire' ); if( isset( $translation[$single] ) ) { return $translation[$single]; } if( isset( $translation[$plural] ) ) { return $translation[$plural]; } return $translated_text; }Replace
Commentairewith your texts.Hope it helps ๐
December 3, 2016 at 9:36 am #1279850
canismundiParticipantMAybe I have to do something more?
It doesn’t work ๐December 3, 2016 at 10:02 am #1279855
ThaiModeratorHey There,
I replaced with this code and it seems to work:
add_filter('ngettext', 'x_translate_text' ); function x_translate_text($translated) { $translated = str_ireplace('Items', 'Productos', $translated); $translated = str_ireplace('Item', 'Productos', $translated); return $translated; }Cheers!
December 3, 2016 at 10:13 am #1279857
canismundiParticipantFor me works , only when you are logged in, but doesnt when are logged out. Please watch it.
I am thinking leave the word items. But, i have the same problem in other places of X theme and woocomerce…
And I have read the same problem in forum a lot of times. Could be a better solution? That solves the global problem?
^^Lost in translation^^December 3, 2016 at 12:02 pm #1279915
ThaiModeratorThis reply has been marked as private.December 3, 2016 at 1:58 pm #1280019
canismundiParticipantNow it works fine! Thanks a lot
December 3, 2016 at 11:02 pm #1280251
Rue NelModeratorYouโre welcome! We’re happy to help you out.
If you need anything else we can help you with, don’t hesitate to open another thread. -
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1272320 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
