String Delimiters
The string delimiters specify the characters that indicate the beginning and the end of a translatable string within the text file.
Every string definition contains a pair of string delimiters as well as a number of other specifications.
In the first two entry fields, enter the characters that indicate the beginning and the end of a string. All the characters contained between these delimiters comprise a translatable string that can be read in Passolo.
The string delimiters can also contain placeholders for special characters:
<POS> defines the current position in the file. You can use <POS> to define strings that follow the preceding string directly without an explicit marker at the beginning.
<TAB> defines the tab character.
<EOL> defines the end of the line
<SPACE> defines a series of one or more spaces. You can also define a specific number of spaces, e.g. <SPACE[1]> for exactly one space or <SPACE[1-2]> for one or two spaces.
Using regular expressions instead of simple characters as string delimiters you can create even more powerful parsing rules. Thus you can define recognition rules for much more complex text formats. (see below)
ID and comment
In case the text files also contain string IDs, you can specify these as well with String ID. If the text has the following format 3340="sample text",for example, you can define Last number before beginning delimiter . The string "sample text" would then be imported with ID 3340.
Using regular expressions you can also define the ID as a reference of the expression. A reference is a bracketed sub-expression. For n, specify the reference number. A 1 refers to the first sub-expression in the first set of brackets (see example)
Moreover it is possible to extract a comment for the source string from the text file. This requires the use of regular expressions.
Example with a regular expression:
// comment 1
IDS_ONE
"text 1"
// comment 2
IDS_TWO
"text 2"
The string delimiter for the beginning of the string looks like this:
//(.*)\n(.*)\n"
The search begins with a double slash "//". Then a random text "(.*)" followed by a line break "\n" and another random text. The two texts are enclosed in brackets so that they can be referenced. Finally there is another line break and the " character.
The string ID is then taken from the 2nd reference in the beginning expression and the comment from the 1st reference in the beginning expression.
Thus the two strings "string 1" and "string 2" can be extracted with their correct string IDs and comments.
Limit to resource types
If you use various resources with different string delimiters, you can also specify a resource type for the string delimiter (see ). Leave this field empty if you have not defined any resources or this delimiter applies to all resources. If you specify a resource type, this string delimiter will only be used when a resource of that type is imported.
Segment strings
Select this option if you want to segment long strings into single sentences - these are then displayed as separate strings in Passolo.