https://jsfiddle.net/09fqps3n/
<div >
<a href="#" >
<svg
...
</svg>
<span>Contact Us</span>
</a>
</div>
I have WPML translator plugin, it add to domain /language in link (for example domain.com/en, domain.com/ru and so on). I created the menu on the top of my site and it translates my ul-li list.
So
I want to translate the button "Contact Us". What is the simpliest way how can i do it use JS or PHP. I imagine it something like this: when i have /ru - my button become to be "Связаться с нами"
CodePudding user response:
The wpml plugin has options to change translation for individual strings. Assuming your code has
<span>Contact Us</span>
It should have been output using php like this
<span><?php echo __('Contact Us', 'text-domain')__; ?></span>
(More about text-domain
later)
Then you can go to wpml menu in admin and choose "Theme and Plugin Localization" where you will see possibility to translate all plugins and themes in their different text-domains.
As for your theme, it should appear there with its text-domain name. Then you can "Scan selected themes for strings" and afterwards once you click on your theme name you will see all the strings that were found. Now translate.