Bỏ qua điều hướng

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.

There are generally two types of links:

  • Internal links point to pages on your own site
  • External links point to other sites

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:

Translating links in the Advanced Translation Editor
Translating links in the Advanced Translation Editor

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.

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:

<a href="https://example.com/nature-gallery/" title="Browse our collection of nature photos">Visit Our Nature Gallery</a>

In most cases, HTML attributes will appear as individual segments with the HTML label. 

In our example, our title attribute appears in the editor:

Translating HTML attributes in the Advanced Translation Editor
Translating HTML Attributes in the Advanced Translation 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.