Find, Replace & Put is a built-in Translator++’s utility which is very useful for performing text searches in your projects.
You can perform quick searches and manipulations using this utility.
Find
You can open the Find window with Ctrl+F
shortcut.
You can specify where the search will be performed by selecting it in the Target dropdown menu. Press the ctrl key
on the keyboard to select more than one option.
By default the search will search in Grid and Context.
The search tool also supports the glob pattern. That way we can search for text using certain patterns easily without using regular expressions.
The star “*” is a wildcard character.
For example, we can search for all text that is an event name with the following pattern:
/events/*/name
Searching for tags
To search for tags, you can type the name of the tags in the search field. For example, you can search for all rows with red and yellow tags by entering “red yellow” in the search field. And don’t forget to select Tag in the Target field.
Search options
1. Case sensitive
If checked, the search will be in case sensitive mode.
2. Transpile \r\n\t
In some cases you may want to look for phrases that contain non-printable characters, such as enter, tab or carriage returns. You can search for those phrase by using the following escape code:
Symbol | Remark |
\r | Carriage return |
\n | New line |
\t | Tab |
3. File to search
By default search will search all files in your project. But you can specify the search to specific files that you want.
4. Regular Expression
By enabling this option you can use the Javascipt’s regular expression.
We have the dedicated page that explains how to use regex in search window.
Replace
Replace works almost the same as Find, but you don’t just search for a phrase, you can replace it with a new phrase.
The shortcut for Replace is Ctrl+H
.
Pressing Ctrl+H while highlighting a phrase on Translator++ will automatically bring you to the Replace window with the highlighted phrase as default.
Put
PPut is a unique feature of Translator++. You can search for a row and put the translation in the column you want using this feature.
This feature allows you to make quick translations of a line or a row you want, especially if they are used repeatedly in your project.
Behavior
- If you enter a single line on the original text. Then the search mode is performed in line-by-line mode.
- If you enter more than a line on the original text. Then the search mode is performed in row-by-row mode.