Does WPML translate numbers automatically, or do I have to do the string translation?

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!

Topic xgettext translation plugin-wpml Wordpress

Category Web


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

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.