Question

I'm developing my site in English, and when I'm done, I'll be turning it into Arabic. I'm using a function and wondering whether I should wrap it into a gettext call for WPML to get or just leave it as it is and it will be converted into Arabic automatically (since it's numbers and not text)?

Should I do this?

<?php echo $woocommerce->cart->cart_contents_count;?>

Or keep it like this?

<?php echo sprintf(__('%d', $woocommerce->cart->cart_contents_count));?>

Thanks!

Was it helpful?

Solution

It is better to use gettext calls, according to WPML Guidelines.

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top