Find and replace

Search for a text and replace it with a new value.

Ilya Krukowski avatar
Written by Ilya Krukowski
Updated over a week ago

Please note that Find and replace feature is available to project admins only: regular contributors cannot perform this operation.

Lokalise enables you to perform the find and replace operation with ease. In this article you'll learn how to achieve that and what options you can adjust.

Finding the values to replace

To replace some text with a new value, open your project editor and click the Find and replace icon:

You will be presented with the following dialog:

  • From the All languages dropdown you can choose a specific language to search. This dropdown is available only when you're searching among translations β€” you cannot select a language when searching among key names or tags.

  • If the Match case option is enabled, the widget will search only for the words with exactly the same case as you specified. For example, if you've entered welcome then the word "welcome" will be returned as a result, but not "Welcome" or "weLComE".

  • Enter your search term in the first text input (in the example above we entered "Hello").

  • Enter a replacement value in the second text input (in the example above we entered "Good day").

  • You can search among translations, key names, and tags by switching between the three corresponding tabs.

After the search term is entered you'll be presented with a handful of results or "Nothing to show" message saying that the widget could not find anything based on your query.

Translations

When performing a search among translations, for each result you can see the following info:

  • The platform that the translation key is assigned to (in the example above the result is assigned to the Web platform as indicated by a "Google Chrome" icon).

  • Translation key name (in the example above the name is welcome).

  • Translation language (in the example above both translations are in US English).

  • The found text is highlighted with a yellow background.

Keys

When searching for translation key names, the results will look a bit different:

For each result you can see:

  • The platform that the translation key is assigned to (in the example above one key is assigned to Android and Web platforms, whereas the second key is assigned to the Web platform only).

  • Translation key name (in the example above the names are your_order and your_name).

Tags

When searching among tags, you'll see the following output:

In this case only the tag name ("API" in the example above) is displayed.

Replacing with the new value

Once you've found the items, you'll need to choose the values to be replaced with a new one. To achieve that, tick the checkboxes next to the results. Alternatively, you can click Select all or Deselect all at the bottom of the dialog. Once you are ready, click Replace:

When you click the Replace button, the following operations will be performed:

  • If you were performing a translation replacement, your translation memory will be updated accordingly with the new value.

  • The actual replacement will be performed.

Please note that a project snapshot won't be created automatically therefore you might want to do it manually before performing find and replace operation as explained in the corresponding article.

Search without replacement

If you would like to find a value in the project editor but not replace it, use the Search box in the top right corner:

  • Enter a search term. Please note that if you've applied a filter, the search will be performed only among the filtered results.

  • Enable or disable the Exact match option (displayed as "quotation marks" icon). If this option is enabled, only the items exactly matching the search term will be displayed. For instance, if you're searching for a word "name" and enable the Exact match option, the results will contain a translation "name" but won't contain a translation "Your name".

  • Enable or disable the Case sensitive option to make the searching case sensitive or insensitive.

The search will be performed across keys and values.

The found matches will be highlighted with a yellow background.

Did this answer your question?