Key referencing

Updated 19 days ago ​by Nick Ustinov

Using Lokalise placeholder

There are many cases when you have similar content in multiple strings, for example "Cancel" is one of the common examples. Usually projects have many keys for the Cancel button (as the translation may vary depending on the context for different languages).

You can easily solve this by linking or referencing one key from another. Use Lokalise placeholder to do this:


Inserting this placeholder would actually fetch source_key_name value for specific language (in the editor and when exporting).  Even more, you can use placeholder inside the text, or use multiple placeholders in the same field:

Would you like to [%key:button_cancel%] or [%key:button_proceed%]?

Example above would produce the following result:

If you hover the mouse over dialog_title English value, you can click green key name itself to navigate to the source key or click any other area to edit it.

Linking duplicates using referencing

First, switch to language duplicate find view. To do so, click small language triangle on the dashboard and choose "Show duplicates".

In the duplicates view, there is an option to link the keys one by one (make sure to select the "main" one first) or link 'em all using the button on top.

Have a nice linking! 

How did we do