Skip to content

Instantly share code, notes, and snippets.

@ahmedeshaan
Created November 17, 2016 03:25
Show Gist options
  • Save ahmedeshaan/e39a639b3fdf785b02af919965554905 to your computer and use it in GitHub Desktop.
Save ahmedeshaan/e39a639b3fdf785b02af919965554905 to your computer and use it in GitHub Desktop.
<?php
add_filter('gettext', 'translate_reply');
add_filter('ngettext', 'translate_reply');
function translate_reply($translated) {
$translated = str_ireplace('Be the first to review', 'Sé el primero en comentar', $translated);
$translated = str_ireplace('There are no reviews yet', 'No hay comentarios aún', $translated);
// For More WooCommerce String Translation
//$translated = str_ireplace('english string', 'spanish string', $translated);
return $translated;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment