simeonN-2
Shortcode translation issues
Noman
Supporter
Languages:
English (English )
Timezone:
Asia/Karachi (GMT+05:00)
I have wrapped the hardcoded strings in the gettext(__()) function to make them translatable. So here are the example steps that I followed to make hardcoded strings translatable:
1. Replaced the below code:
return'<a href="'.get_permalink( wc_get_page_id( 'cart' ) ).'">Warenkorb</a>';
With:
return'<a href="'.get_permalink( wc_get_page_id( 'cart' ) ).'">'.__('Warenkorb', 'themedomain').'</a>';
2. Scanned the child theme from WPML >> Theme and plugins localization page.
3. Searched for those strings and added the test translation. You can update it from here:
hidden link
You may follow the same steps for all your hardcoded strings.
Here are docs for more details:
https://developer.wordpress.org/reference/hooks/gettext/
https://wpml.org/documentation/support/translating-the-theme-you-created/
Please let me know if this resolves your issue or if you need further assistance.
Thank you
simeonN-2
Thank you very much!
Now it's perfect! Honestly, I still don't understand this completely but I will take time to learn it!
Thank you again!