To translate links and HTML attributes, open the page with your link or attribute in the Advanced Translation Editor and translate as you normally would.
How to Translate Links
There are generally two types of links:
Internal links point to pages on your own site
External links point to other sites
Translating Internal Links
WPML automatically handles internal links and generally, you shouldn’t translate them. If there’s a translation of the page that the link points to, WPML adjusts the link in that language automatically.
If an internal link is a part of regular text you will see it displayed in the translation editor as a highlighted marker:
There is a known issue that prevents you from translating internal links that are inside a button, call to action, and other such blocks. We are working on fixing this.
Translating External Links
External links automatically appear in the editor and you can translate them. If you cannot see any of the external links, start typing “http” in the search bar and you should get a list of all such links you can translate.
If you cannot find any of your external links within the Advanced Translation Editor, please contact our Support and let us help.
How to Translate HTML Attributes
HTML attributes appear as regular text with the HTML label. For example, consider a custom HTML block with a link that has a title attribute:
In most cases, HTML attributes will appear as individual segments with the HTML label.
In our example, our title attribute appears in the editor:
In some cases, your HTML attributes won’t appear for translation automatically. If this happens, use the search bar to look up the name of your attribute and translate it.
If you still cannot find your HTML attributes within the Advanced Translation Editor, please contact our Support and let us help.
Want to translate URL slugs? See our guide about translating URL slugs for more information.