This topic has 4 replies, 3 voices, and was last updated 6 years, 9 months ago ago by Olga Barlow
Hello,
I would like to know why you override the default woocommerce text strings with your own ones, p.e. in cart.php, there is by default:
<?php esc_html_e( 'Product', 'woocommerce' ); ?>
and you transform it to:
<?php esc_html_e( 'Product', 'royal' ); ?>
Replacing the ‘woocommerce’ textdomain with ‘royal’ means that I have to translate all strings again because Royal theme is not translated in my language (German). Leaving them just with the default ‘woocommerce’ text domain would be perfect because all the strings are already translated by woocommerce.
So this makes no sense to me at all, maybe you can explain why you do this.
Many thanks in advance.
Hello,
Text domain was changed only in files that were overwritten in our theme. If a WC file was added into royal/woocommerce folder, text domain should be changed for correct functionality. Please read about theme translation – https://www.8theme.com/documentation/xstore/theme-translation/base-theme-translation/ (this for xstore theme, but you can use this information for the royal also). Let us know if you need any help with theme translation.
Regards
Hello,
thanks but I still dont understand the reason. I changed all text strings (via child theme) back to woocommerce so that I dont have to translate everything again and I dont see any problems with functionality. I am using Loco translate and that works like a charm, so I need no help with translating, I just dont understand why the default text strings should affect the functionality?
Hello,
If you need detailed information about theme localization read these articles
https://developer.wordpress.org/themes/functionality/localization/
https://premium.wpmudev.org/blog/how-to-localize-a-wordpress-theme-and-make-it-translation-ready/
To avoid problems with translation we use theme text domain for all the strings included in our theme, even for the WC files because if they are included in theme folder they are part of the theme, not part of the plugin.
Regards
You must be logged in to reply to this topic.Log in/Sign up