🔗 Why use Duplicity Linking? 🔗
It's hard to avoid creating duplicated keys when localizing a large project. In some situations, such as migrating projects or building a new version/iteration, it's inevitable to maintain duplicate content.
The need for duplicity management grows even more when multiple teams simultaneously work on a single project. You can't really expect everyone to remember that there is already a button with the same label in a part of the project that was developed by someone else.
Minimize room for error 🔗
Even with all the assistive technologies and translation memory, your translators would still need to go through all the duplicated keys for each of the languages your project is translated into to be sure that everything is 100% correct.
Also, the same content only sometimes means that it's duplicate as there are words with different meanings in different contexts.
Let's take the word "share," which can be used as a noun, "part of the ownership of a company," or a verb, "to put something on a social media website."
The same word often can be translated differently into each language, and the translator would need to decide whether the key is duplicated for every single language in your project.
You would expect the resulting translation can end up being wrong, mainly when using machine translations but remember that humans can make mistakes too. Linking the duplicate strings and providing good context will help you minimize these errors.
Multiplatform development 🔗
With Localazy, you can solve such a situation in numerous ways. For example, my favorite would be to use the Format Conversions feature and go with a single Localazy project for both platforms and seamlessly convert translated content to file formats supported by the other.
But what to do if you can't use format conversions? E.g., when you have a completely different key naming pattern and want to keep it the same everywhere in your app?
🤔 How does it work? 🔗
As you can see, there are many reasons why duplicated keys are inevitable and an important part of the software localization process.
For this reason, Localazy comes with the Duplicity Linking feature allowing you to reuse content automatically across linked keys in all languages and even across several projects.
The solution that Localazy uses is to link multiple different keys with the same content. One of the keys is the content source. This key remains the same in all respects and is available to translators as usual.
The linked keys are hidden and are not shown to translators at all. These keys also retain their own values and any existing translations. However, after linking the duplicate key to the content source key, its previous values are not used. When the value of the linked key is retrieved during publishing, format conversion, or in the public API, the value from the content source key is used instead for all languages.
When you remove the link, the linked key will become active again, use its original values and translations and behave like a regular key.
🌍 Duplicity linking is available from the Agency plan.
📋 How to resolve duplicates 🔗
Let's learn how to solve this common localization issue effectively. To start, activate the Agency plan and visit Duplicities in the Localazy console to check the list of your projects and how many duplicates are contained in each of them.
Click on Actions for the project you want to start with and select Resolve duplicities.
You will see a list of duplicates to resolve.
It's constructed as a list of tasks, and you can start resolving duplicities by clicking the Edit button on the right side.
In the dialog that popped up, you can create links between keys or mark keys as unique by using the Options menu on the right side of each of the keys.
Duplicates are sent to the Resolved list when all items are linked or marked as unique. Whenever there is any change in the project that creates new or affects existing duplicates, they are automatically moved back to the Unresolved list.
And that's it! You have successfully resolved duplicates in your project.
Review and remove links 🔗
Sometimes, you need to identify how keys are linked without looking for them in the list of duplicates. Such as when you want to find the relevant information for a specific key.
From the duplicities screen in the console, you can also click Actions for the selected project and use the Show Links option to show all existing links.
Now, you can examine and filter existing links and, when desired, remove them.
Along with the duplicity resolve screen described above, links management allows you to effectively control how duplicates are tackled in your project.
Resolve duplicates across several projects 🔗
The process is essentially the same as described above for a single project. In the console, you can select multiple projects (up to 4 at the same time), and from the Cross-Project Actions that appear in the table header, select Resolve duplicities.
As in a single project mode, you are presented with all the duplicates in a task-like list. Everything works exactly the same, except that you can see what project the key is coming from when linking them:
And that's it! Nothing special is needed to link keys across many different projects!
Resolve duplicates using public API 🔗
You can manage duplicity links using the Localazy API and automate their creation or deletion.
You can read more about Duplicities API in our documentation
It's a practical solution when you can introduce your logic for duplicate resolution or when you need to migrate data.
📑 Duplicates in the source language listing 🔗
You can see the total percentage of duplicities in the language list next to the source language item. By clicking on it, you'll get redirected to the console.
When navigating to the source language table, you can identify already resolved duplicities by their status.
- Linked keys - Link icon
- Content source - Active string with a link badge
You can click on the status to modify the link in the console.
Linked duplicities are, by default, hidden. They won't appear in the translation session or the language tables. When downloading or exporting the content, duplicate strings will be replaced with content from the linked source content key.
As described earlier, you can remove the link directly in the batch option dropdown menu or the console.
✔️ Conclusion 🔗
We hope you like the new feature and that Localazy can help make your localization efforts even easier now! Go to your list of languages in Localazy and see how many duplicates are waiting to be resolved.