Archived topic
traducir GP Premium plugins
19 replies · Started by carlos on June 14, 2019
Buenas quiero traducir algunas palabras de GP Premium a español he utilizado LOCO Translate, pero a pesar de guardar los cambios continua en ingles, adjunto imagen de lo que quiero trasladar.

UN saludo
Hi there,
Can you trying using the gettext method as shown in the examples below and see if it works?
https://generatepress.com/forums/topic/change-to-spanish-or-erase-titleview-your-shopping-cart/#post-912300
https://generatepress.com/forums/topic/display-cart-panel-on-add-to-cart/#post-909790
Adding PHP: https://docs.generatepress.com/article/adding-php/
Let me know :)
Perfecto Leo!
Ya he traducido las 2 frases principales, solo me queda la palabra "items" que aparece abajo en mas pequeño adjunto imagen, lo he hecho del mismo modo pero no la cambia.

Un saludo
Hi there,
Your screenshot doesn't seem to be working - can you double check?
Buenas Tom,
A ver ahora

Un saludo
Hmm, I still can't see the image: https://www.screencast.com/t/CGYGJpbdtWth
Can you try uploading it somewhere else?


Espero que ahora la puedas ver, si no puedes verla es la misma imagen que esta en el primer post y me refiero a la traduccion de items que aparece al lado de numero de los articulos debajo de la frase "articulo añadido al carrito", ese items que aparece en pequeño es el que quiero traducir.
Un saludo
Doesn't look like I'm able to see anything on that website.
As a guess, does this do it?: https://generatepress.com/forums/topic/display-cart-panel-on-add-to-cart/#post-909790

Para poder verlo hay que hacer una compra de un articulo que es cunado sale el mensaje en https://sien.es/tienda
ya he probado con esto:
add_filter( 'gettext', function( $translated_text ) {
if ( 'Item added to cart.' === $translated_text ) {
$translated_text = 'Your new text here';
}
return $translated_text;
} );
Y he logrado traducir 2 frases pero no me traduce "items" que aparece debajo de añadir al carrito.
Un saludo
Can you try uploading the screenshot somewhere other than your website? Maybe Dropbox or something similar?

ahora?
I'm getting a "The file does not exist" error there.
Perhaps try this site: https://imgur.com/

maybe now.
Aha, got it. Not 100% sure if it will work, but try this:
add_filter( 'ngettext', function( $text ) {
if ( 'item' === $text ) {
$text = 'Item';
}
if ( 'items' === $text ) {
$text = 'Items';
}
return $text;
}, 10, 3 );
Buenas Tom,
Parece que no se soluciono.
¿Alguna otra sugerencia se te ocurre?
Un saludo.