Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
WooCommerce Snippet - einzelne Wörter übersetzen
add_filter('gettext', 'translate_text');
add_filter('ngettext', 'translate_text');
function translate_text($translated) {
$translated = str_ireplace('sale', 'Angebot', $translated); // "sale" und "Angebot" anpassen und bei mehreren Wörtern die Zeile kopieren.
return $translated;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment