Keep your duplicate strings under control with the Duplicity Linking feature

article-image

One issue that you will inevitably encounter during software localization is the translation of duplicate strings. Lucky for you, Localazy can help you resolve all duplicates in your projects. Learn more about the Duplicity Linking feature in this article.

๐Ÿ”— 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 ๐Ÿ”—

Another beautiful example is developing Android and iOS versions of your app. Both versions will share a large portion of their content.

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.

article-image

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.

article-image

Click on Actions for the project you want to start with and select Resolve duplicities.

You will see a list of duplicates to resolve.

article-image

It's constructed as a list of tasks, and you can start resolving duplicities by clicking the Edit button on the right side.

article-image

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.

article-image

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.

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.

article-image

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:

article-image

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.

article-image

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
article-image

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.

article-image
Source Language table in Localazy showing linked duplicities.

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. ย 

Automate your localization today! โš™๏ธ

Translate your project in a breeze, utilize the advanced features and fully automate your localization process with Localazy!

Join Localazy