ezParseT technology provides a scalable and robust framework for developing file parsers for virtually any file type and encoding system. As a localization engineer you can develop parsers without writing a single line of code using ezParse. It achieves this using the power and flexibility of regular expressions combined with a visual development environment.
1. Go to Tools -> Options and select ezParse from the list displayed on the screen.
2. From File Groups select Text Based Files and select TXT from File Extensions.
3. Add a new rule for TXT files by clicking the Add button. Name this rule ID-Based.
|
|
|
4. Select your new rule using the mouse and click the Edit Rule button.
|
|
|
5. Hit the Browse button and locate the file IDBasedFiles.txt. You'll find this in your samples folder on the Alchemy CATALYST product CD. Once you've located this file hit the Preview button to see the contents of the file displayed in the Preview panel.
6. Let's develop an ezParse regular expression to extract text and Ids from this file so that we can translate it.
By examining the file, you'll see that each line has a regular and repeating structure. There is an Id followed by text, surrounded by double-quotes. This regularity makes it easy to develop a regular expression to extract both the ID and text.
|
|
|
IDS_STR_01 = "Id's improve the accuracy of leverage" | |
|
|
|
Start Tag |
^([^=]*)=\s*" |
|
|
|
End Tag |
" |
7. Type the regular expressions above into the Start and End tags and hit the Preview button again. You'll now see the text that matches these regular expressions displayed in the Preview panel. Use this mechanism to fine tune your regular expressions and see the effect of modifying and adding new regular expressions to your rule. Press OK when you're satisfied with your ezParse rule.
Now that you've created a new rule for this file, click on the root of your Project TTK file and insert the file IDBasedFiles.txt. When requested, select the rule ID-Based from the list displayed on the screen.
|
|
|
|
|
|
Text files that contain IDs can be aligned automatically using Import Translations. In addition to this, the Alchemy Leverage Expert will use these IDs as part of the trait information when searching for translation matches. The presence of these IDs ensure that Alchemy CATALYST maximises the re-use of translations. |