When you’re building a multilingual website, it’s helpful to know how to translate a web link into the right language. After all, for a website to be truly accessible across different geographies, all of the components must appear in the right language.
Learning how to translate a website link can boost the chances of your readers and customers sharing your links with other users in different countries. Plus, it ensures you’ll send your readers to external pages that are written in the same language as your source page.
The good news is that translating a web link is relatively straightforward with the right tools. TranslatePress is an all-in-one solution for multilingual translation. It allows website owners to convert all kinds of content into different languages, via an easy-to-use visual editor.
TranslatePress can automatically translate your internal links for you when you set up the plugin. However, you can also manually translate a range of links and slugs according to your specific needs.
Ready to learn more? Then, read on!
Why Translate Links in WordPress?
As mentioned above, learning how to translate a web link can be an important process for a website owner. When someone clicks on a link within your site, or someone shares a link to your website, it’s important the link reflects the language they’re going to be using.
Some of the core use cases for translating links in WordPress include:
- Translating internal links: Ensuring the internal links in your WordPress appear in the right language.
- Altering custom links: Making sure all of the custom links deliver a consistent experience.
- Translating external links: Improving user experience by translating external links and links to media automatically.
- Altering URLs: Making sure your URLs and URL slugs follow the same consistent language as the rest of your content.
How to Translate an Internal Web Link in WordPress
Internal links are automatically converted by TranslatePress to the needed language when all your languages are set up.
But to get started, you’ll need to install the TranslatePress plugin. You can do this by navigating to Plugins → Add New from your WordPress dashboard and searching for “TranslatePress” in the search bar.
Next, you’ll want to configure your basic set up and add your extra languages. With the free version you can add one additional language, while the premium plans offer unlimited languages.
Don’t forget to save your changes at the bottom of the page when you are done.
Now, TranslatePress will take care of all internal URLs and all the page or post links within your site are going to be translated to their version of the currently displayed language.
If you want to translate URL slugs as well as internal links, install the SEO Pack add-on too (which is included as standard with TranslatePress Premium). But we’ll discuss how to translate URL slugs briefly at the end of this post.
How to Translate a Custom Internal Web Link
You can also translate custom internal links you add directly into your HTML (without PHP functions) using TranslatePress. To enable automatic translation of such links you’ll need to dive into your TranslatePress Settings. You can do this in two ways. Either go into your plugin list within your WordPress admin page and click on Settings → TranslatePress:
Alternatively, you can hover over the Translate Site tab added to the top of your WordPress dashboard after you install the plugin and click on Settings:
In the General tab for your TranslatePress settings, scroll down to Force language in Custom Links. This will allow you to automatically force custom links to translate without the need for language encoding.
Save your settings before you return to your WordPress dashboard.
How to Translate External Links & Links to Media
After you set your custom links to automatically translate, you can start translating external links, and links to internal media.
You can do all of this within the Translation Editor interface when you translate a WordPress post or page.
At the top of the page, click on the Translate Page button.
This will take you to the TranslatePress Visual Editor.
Hover over the link you want to translate and click on the pencil button to translate it in the sidebar on the left. For each language, you can either enter a link corresponding to the external page in the correct language or select a new resource using the Add Media button. This will allow you to use the WordPress media library to choose an existing file or upload a new file. This is useful for image “translation” when you need to display different images based on each language.
In the screenshot above, you can see the external link to the Wikipedia article translated from English to Spanish. This basically ensures you can send your audience to the resource relevant to their chosen language.
Each of the translation options offered by TranslatePress ensures you can easily and automatically translate your entire site, including links and URLs, for a consistent user experience.
How to Translate URLs
WordPress users can also leverage TranslatePress to translate URL slugs. There are two ways to do this, either automatically, or manually.
Manual slug translation is often a good choice if you only have a handful of pages, products, or posts to translate. To begin, navigate to the page, post, or product you want to translate the URL of, and select the Translate Page button in the admin bar.
If you already have the SEO pack add-on from TranslatePress activated, the visual interface for TranslatePress will also display SEO meta information and URL slugs within your drop-down menu. Choose the slug you want to translate from the dropdown and enter the translation in the sidebar.
Save your translation, and the next time you refresh the page in another language, the translated version of the URL slug should appear.
The same process will work if you want to translate URL slugs for WooCommerce products too.
If you’d prefer to translate your URL slugs automatically, go into the TranslatePress Settings, and click on the Automatic Translation tab. Set Enable Automatic Translation to Yes to uncover the rest of the settings. Then, scroll down to the Automatically Translate Slugs section.
Check Yes, then hit the Save Changes option at the bottom of the page.
Keep in mind that for this feature to work you’ll need to first select the translation engine you’d like to use, either Google Translate or DeepL. For any of these services, you’ll need to retrieve an API key. Find out how to do this for:
You can also translate multiple URL strings quickly and easily from within the String Translation interface. When you open the translation editor, you’ll see another button titled String Translation at top of the sidebar. Clicking this pushes you into the Slugs tab. Here you can see all of your slugs in one place, and translate them rapidly in one go. This is an ideal option for larger websites.
Start Translating Links with TranslatePress
If you’re ever browsing a website and clicking on a link just to be sent to a page in the wrong language for your needs, you’ll know how frustrating that can be. Translating your links and URL slugs ensures you can provide your customers with a consistent, streamlined experience.
In this post, we covered the various ways you can translate links and URLs using the right plugin. TranslatePress will allow you to quickly translate all of the components of your WordPress site, from the content to the custom and external links and media. The SEO pack add-on also improves your chances of ranking for multiple languages.
Ready to start building your multilingual site with translated links? Download TranslatePress today and follow this tutorial. Don’t forget to upgrade to a premium package for automatic machine translation, SEO features, and bonus features.
TranslatePress Multilingual
The easiest way to translate your WordPress website's links.
Get the pluginDo you have any questions about translating links or URLs? Leave a comment below and we’ll do our best to help.