Last active
February 3, 2023 09:48
-
-
Save jjmontalban/7877487101dc3ee784c2837f2ef7c4a3 to your computer and use it in GitHub Desktop.
Traducir cualquier texto en WP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Traducir cualquier texto en WordPress */ | |
add_filter( 'gettext', 'traducir_cualquier_texto', 10, 3 ); | |
function traducir_cualquier_texto( $translated, $original, $domain ) | |
{ | |
if ( $translated == "Shipping and delivery" ) { | |
$translated = "Envío y Entrega"; | |
} | |
if ( $original == "Delivery Date" ) { | |
$translated = "Elegir fecha de entrega"; | |
} | |
if ( $translated == "Delivery Date " ) { | |
$translated = "Elegir fecha de entrega "; | |
} | |
return $translated; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment