How can I change the associated URL of a translation?
In this article, you'll see how Weglot is managing the translation's associated URL and how you can manually change it
1. What is the associated URL of a translation
2. How can I manually change the URL of a translation
B. With multiple translations at the same time
1. What is the associated URL of a translation
Actually, the Weglot translation mechanism works like this:
- It scans the original content of your online website (HTML file)
- After the scan, Weglot parses (read and cut) the elements between HTML tags
- It automatically translates this original content to its translated equivalent. It also reuses the translations that are already in your translations list if some contents have already been translated
- If there are contents that are not in the translations list, Weglot will translate and add them to your translations list available in your Weglot Dashboard
So, basically, all the translations generated by Weglot will be present in your translations list. You can reach your translations list from your Weglot Dashboard > Your project > Click on the corresponding pair of languages.
Also, Weglot will always associate one translation with one URL, even if the content is displayed on several pages. In fact, a translation should be associated with the shortest URL on which this translation has been seen.
For example, the translation of your main menu should always be associated with your homepage.
Finally, please note that Weglot is using the relative URLs (/product/) and not the absolute ones (https://mywebsite.com/product/)
It means that your homepage will appear like this: /
2. How can I manually change the URL of a translation
In order to manually change the URL of a translation, you can go into your Translations List and use the search bar and the different filters in order to locate any translations easily:
--> Search Filters - How to easily find a translation?
Once it's done, you have 2 possibilities to do it:
A. One translation at a time:
Once you've found the translation, you can click on the button with three lines at its right:
You should then see a new window with different tabs. In this case, click on "information":
Finally, you'll see a field named "Associated URL" that you can edit in order to change the associated URL of this specific translation.
B. With multiple translations at the same time
Once you've found the translations, you can bulk select them with the checkbox on the left side of each translation:
After that, you will have to click on the 3 dots in the bottom right corner and click on "Change associated URL":
Finally, enter a new URL in the popup and click on "Associate" and you're done!