I have been able to translate most things on the site with the code below, but not for 3 fields.
"USD" "/Month" "/Month for 1 Month For".
I would like to make that say something different that will make it easier to translate later.
function wc_billing_field_strings( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case '/ Month' :
$translated_text = __( 'Monthly-Cycle', 'woocommerce' );
break;
case '/ Month for 1 Month For' :
$translated_text = __( 'Monthly-Cycle for a Month', 'woocommerce' );
break;
case 'USD' :
$translated_text = __( 'US-Dollar', 'woocommerce' );
break;
case 'First renewal' :
$translated_text = __( 'First-Cycle', 'woocommerce' );
break;
}
return $translated_text;
}
add_filter( 'gettext', 'wc_billing_field_strings', 20, 3 );
Better try to use the following for "USD", "/Month" and "/Month for 1 Month For" strings:
And for "First renewal" string better use:
Code goes in functions.php file of your child theme (or in a plugin). It should work for most strings.