localize direct manual 1. user's guides...string type can have it's own cell renderer...

50
Localize Direct Manual Page 1 1. User's guides . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1 Administrator's guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2 Developer's guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2.1 Using LocScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2.2 String types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.2.3 LocScript functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.2.4 setExcel color list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 1.3 Localization manager's guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 1.3.1 Exporting and importing translations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 1.3.1.1 Export templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 1.3.1.2 Exporting and importing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 1.4 Translator's guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 1.4.1 Starting out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 1.4.2 Ready for translation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 1.4.3 Searching for text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 1.4.4 Adding translations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 1.4.5 List Strings in Sub-folders functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 1.4.6 Status indicators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

Upload: others

Post on 19-Apr-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Page 1

1. User's guides . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.1 Administrator's guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.2 Developer's guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.2.1 Using LocScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.2.2 String types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91.2.3 LocScript functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111.2.4 setExcel color list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

1.3 Localization manager's guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201.3.1 Exporting and importing translations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

1.3.1.1 Export templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211.3.1.2 Exporting and importing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

1.4 Translator's guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411.4.1 Starting out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411.4.2 Ready for translation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431.4.3 Searching for text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451.4.4 Adding translations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471.4.5 List Strings in Sub-folders functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481.4.6 Status indicators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

Page 2: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 2

User's guidesAdministrator's guideDeveloper's guideUsing LocScript

LocScript is currently available in some areas of the Build File Templates and the String Types. The areas in theBuild Generators where LocScript can be used is the "Output File Name" area, the file header & footer area, thefolder header and footer area and the string output area.

LocScript code is embraced by  <? (starting marker) and ?> (end marker).

DataTypesintbooleanfloatstring

Collection TypesListMap

Variable assignment and data typesSummary of Operators

Arithmetic Operators Unary Operators Equality and Relational Operators Conditional Operators Equality, Relational, and Conditional Operators The Conditional OperatorsControl Flow Statements

The if-then-else statementThe while-statementThe for-statement

DataTypes

int

The int data type is a 32-bit signed two's complement integer. It has a minimum value of -2,147,483,648 and amaximum value of 2,147,483,647 (inclusive). You can cast an int type to become a string type by:

int i=10;println ("" + i);

boolean

The boolean data type has only two possible values: true and false. Use this data type for simple flags that tracktrue/false conditions.

float

Page 3: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 3

The float data type is a single-precision 32-bit IEEE 754 floating point.

string

The String data type is used for strings of characters.

Collection Types

List

The List collection is an ordered collection that can be used to store and fetch data of different data types on.

Declaring a listA list is declared just like a variable, before it can be populated with data:

List myList;

Adding data to a list:The add-method is used when adding data to the list.

List myList;

myList.add( "Item 1" );myList.add( "Item 2" );myList.add( "Item 3" );

Each added item will get an index (the first added item will get index 0, the second index 1 and so on).

It's also possible to store variable data:

List myList;

String item1 = "Car";String item2 = "Boat";String item3 = "Train";

myList.add( item1 );myList.add( item2 );myList.add( item3 );

Getting data from a list:To get data from the list use the get-method and specify the index of the item to get:

List myList;

String item1 = myList.get(0);

Page 4: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 4

The size-method can be used if you want to make a loop that goes through all items in the list:

int count = 0;while( count < myList.size() ) { println( myList.get( count ) ); count++;}

It's also possible to make lists that contains lists:

List list1;list1.add( "Item1, List 1" );list1.add( "Item2, List 1" );

List list2;list2.add( "Item1, List 2" );list2.add( "Item2, List 2" );list2.add( "Item3, List 2" );

List mainList;mainList.add( list1 );mainList.add( list2 );

Removing data from a list:The remove-method is used to remove data from a list. The data is removed by it's index:

List myList;

myList.remove( 0 );myList.remove( 1 );

Map

The Map collection can by used to store data using a key and a value. The key must be unique, but it can be of anydatatype.

Declaring a MapA Map is declared just like a variable, before it can be populated with data:

Map myMap;

Adding data to a MapUse the put-method to add data to a map and to specify the data key:

Page 5: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 5

Map myMap;

myMap.put( "Key1", "Data" );

Both the key and the data values may be variable data:

Map myMap;

myMap.put( <$identifierName$>, <$sourceLanguageText$> );

String key = "A key";int data = 123;myMap.put( key, data );

Maps can also store other Map or List collections:

List myList1;List myList2;

Map myMap;myMap.put( "List1", myList1 );myMap.put( "List2", myList2 );

Getting data from a MapUse the get-method to get data from a map. Specify the key to get an item from the map:

String myData = myMap.get( "Key1" );

Removing data from a MapUse the remove-method to remove data from a map. Specify the key of the item to remove:

myMap.remove( "Key1" );

Variable assignment and data types

Variables are declared and assigned using the = operator:

Page 6: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 6

int speed = 0;String text = "Hello";

Summary of Operators

The following quick reference summarizes the operators supported by the LocalizeDirect script language: 

Simple Assignment Operator 

= Simple assignment operator 

Arithmetic Operators 

+ Additive operator (also used for String concatenation) 

- Subtraction operator 

* Multiplication operator 

/ Division operator 

Unary Operators 

+ Unary plus operator; indicates positive value (numbers are positive without this) 

- Unary minus operator; negates an expression 

++  Increment operator; increments a value by 1 

--    Decrement operator; decrements a value by 1 

!     Logical compliment operator; inverts the value of a boolean 

Equality and Relational Operators 

== Equal to 

!= Not equal to 

> Greater than 

>= Greater than or equal to 

< Less than 

<= Less than or equal to 

Conditional Operators 

&& Conditional-AND 

|| Conditional-OR 

Page 7: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 7

Equality, Relational, and Conditional Operators 

The Equality and Relational Operators 

The equality and relational operators determine if one operand is greater than, less than, equal to, or not equal toanother operand. The majority of these operators will probably look familiar to you as well. Keep in mind that youmust use "==", not "=", when testing if two primitive values are equal. 

== equal to

!= not equal to 

> greater than 

>= greater than or equal to 

< less than 

<= less than or equal to 

The following program, tests the comparison operators:

int value1 = 1; int value2 = 2; if(value1 == value2) println("value1 == value2"); if(value1 != value2) println("value1 != value2"); if(value1 > value2) println("value1 > value2"); if(value1 < value2) println("value1 < value2"); if(value1 <= value2) println("value1 <= value2"); 

Output:

value1 != value2value1 < value2value1 <= value2

The Conditional Operators

The && and || operators perform Conditional-AND and Conditional-OR operations on two boolean expressions.These operators exhibit "short-circuiting" behaviour, which means that the second operand is evaluated only ifneeded. 

&& Conditional-AND 

|| Conditional-OR 

Example:

Page 8: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 8

int v1 = 1;int v2 = 2;if((v1 == 1) && (v2 == 2)) println("v1 is 1 AND v2 is 2");if((v1 == 1) \|\| (v2 == 1)) println("v1 is 1 OR v2 is 1");

Control Flow Statements

The if-then-else statement

The if-then-else statement provides a secondary path of execution when an "if" clause evaluates to false.

boolean isFlying = false;if (isFlying) { altitude--;} else { println("The plane has landed!");}

The following shows an example of if-else:

int value = 20; String result; if (value >= 50) { result = "Overheating"; } else if (value >= 40) { result = "Hot"; } else if (value >= 30) { result = "Warm"; } else if (value >= 20) { result = "Normal"; } else { result = "Cold"; } println("Result = " + result);

The while-statement

The while statement continually executes a block of statements while a particular condition is true. Its syntax can beexpressed as:

while (expression) { statement(s)}

Example:

Page 9: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 9

int count = 1;while (count < 11) {println("Count is: " + count);count++;}

The for-statement

The for statement provides a compact way to iterate over a range of values. The general form of the for statementcan be expressed as follows:

for (initialization; termination; increment) { statement(s)}

When using this version of the for statement, keep in mind that:

• The initialization expression initializes the loop; it's executed once, as the loop begins.

• When the termination expression evaluates to false, the loop terminates.

• The increment expression is invoked after each iteration through the loop; it is perfectly acceptable for thisexpression to increment or decrement a value.

Example:

for(int i=1; i<11; i++){ println("Count = " + i);}

String types

Using different string types, strings can now be classified. The main purpose of the String Types is to differ betweendifferent types of strings and to set whether or not they should be translated.

Display propertiesCell renderer scriptValidation script

Display properties

The background and foreground color can be changed and different font properties can be set. Changing theproperties of a String Type will affect how the strings are displayed in the string view.

If the Text is HTML check box is enabled then the string view will assume that the content of a text cell is htmlformatted.

For example, a cell with the following text:

Page 10: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 10

This <b>is</b> a <font color="blue">Text</font>

Will be rendered as:This a is Text

Cell renderer script

It's possible to change the display properties based on data. This can be done using a cell renderer script. EachString Type can have it's own cell renderer script. For example, let's say that we would like to change theback-ground color of the cell that displays the source language text to yellow, but only if the check box in a customfield named yellowMarker is set to true. This is what such script will look like

if( <$yellowMarker$> == "true" ) {      setBackgroundColor( "sourceLanguageText", 255, 255, 0 );      setForegroundColor( "sourceLanguageText", 10, 255, 10 );      setFont( "sourceLanguageText", "Monospaced", "bold italic", 24 );}

The above will also changes the font, just to demonstrate this. Not specifying a column name (in the case above sourceLanguageText) will set the display properties on all cells of the row.

Validation script

It is possible to customize validation of values entered in the string table, using a validation script. This validationscript is declared on a String Type in the Validation Script tab. Example:

boolean isMatch = str_match("[a-z,A-Z,0-9]+", <$customField1$> );if( !isMatch ) {   invalidate( " customField1", "Not allowed! This is a Custom Text!");}if( <$DropDown$> == "<UNKNOWN>" ) {   invalidate( "DropDown", "Please select a value other than <UNKNOWN> in theDropDown!");}

Using the script function the specified cell value will be highlighted in red color and when hovering overinvalidatethe cell the invalidate-text will appear as a tool tip text above the invalid cell.

It's also possible to set values in the validation script! For example if a custom check box needs to be checked if acustom dropdown has a specific value:

if( <$DropDown$> == "PS3" ) {   setValue( "CheckBox", "true" )}

Page 11: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 11

Or if a string needs to be upper case:

String idName = UpperCase(<$identifierName$>);setValue( "identifierName", idName )

The function getChangedColumn() will return the name of the column that was changed. For example:

String columnName = getChangedColumn();If( columnName == "identifierName" ) {   // Do Something}

The function getOriginalValue(<columnName>) will return the original value of  the column with the specified name(as stored in the database, before it was edited). For example:

String origValue = getOriginalValue( columnName );

LocScript functionsCommon

getCRCValue( <text>, <charset> )LowerCase( <text> )UpperCase( <text> )getEnvVariable( <string> )print( <string> )println( <string> )printUniqueUNICODE( <text>, <format> )str_csvValue( <string> )str_indexOf( <string>, <find string>, [<startIndex>] )str_match( <regular expression>, <text> )str_replace( <Text>, <FindText>,<ReplaceText> )str_sizeOf( <string> )str_subString( <string>, <beginIndex>, <endIndex> )str_xmlValue( <string> )

Build generator specificactivateExcelSheet( <name> )createExcelSheet( <name> )getAudioEffects( <EffectChainId>, <Effect Separator> )getAudioEffectsWithData( <EffectChainId>, <Effect Value Separator>, <Effect Separator> )getContentFileName( <contentId> )getDataFieldValue( <DataFieldName>, <dataId> )removeReservedTokens( <stringText> )setExcelBackgroundColor( <column>, <row>,<color> )setExcelCellBorder( <column>, <row>, <border>, <style> )setExcelCellFont( <column>, <row>, <FontName>, <style>, <size> )setExcelCellValue( <col>, <row>, <value> )setExcelColumnWidth( <col>, <width> )

Page 12: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 12

setExcelRowHeight( <row>, <height> )setExcelTextColor( <column>, <row>, <color> )

Cell renderer script specificsetBackgroundColor( <Column Name>, <Red 0-255>, <Green 0-255>, <Blue 0-255> )setFont( <Column Name>, <FontName>, <style>, <size> )setForegroundColor( <Column Name>, <Red 0-255>, <Green 0-255>, <Blue 0-255> )

Common

These functions can be used in all areas that supports LocScript such as the build generators, cell renderer scriptsand validation scripts.

getCRCValue( <text>, <charset> )

This function will calculate and return the CRC32 value of the specified string.

<String> = getCRCValue( <text>, <charset> );String crc = getCRCValue( "Text", "UTF8" );

LowerCase( <text> )

This function is used to change all the character of the specified string to lower case.

<String> = LowerCase( <text> );String newText = LowerCase( "Text" );

UpperCase( <text> )

This function is used to change all the character of the specified string to upper case.

<String> = UpperCase( <text> );String newText = UpperCase( "Text" );

getEnvVariable( <string> )

This method will return the value of the specified environment variable as a string. It the variable can't be found, thismethod will return an empty string.

<String sStr> = getEnvVariable( <string> );

print( <string> )

Prints a text to the output

Page 13: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 13

print("Number: %d", 10);

println( <string> )

Prints a text to the output and adds a newline

println("Number: %d", 10);

printUniqueUNICODE( <text>, <format> )

This function will print all characters, using the specified format, that so far has not been used since the script statedto execute. This function typically is used to determine which unicode characters are used when for example dealingwith eastern languages like Japanese and Chinese.

printUniqueUNICODE( <text>, <format> );printUniqueUNICODE( "Hello Lollo", "%c = 0x%u\n" );

The format parameter can be used to specify the output format for each unique character. %u can be used as arepresentation of the hexadecimal UNICODE value of the character and %c can be used to print the UNICODEcharacter. The above example will generate the following output:

H = 0x0048e = 0x0065l = 0x006co = 0x006f = 0x0020L = 0x004c

str_csvValue( <string> )

Converts the string to a string that can safely be used as a value in an CSV file.

<String sStr> = str_csvValue( <string> );

str_indexOf( <string>, <find string>, [<startIndex>] )

Searches the specified string for the first occurrence of the string to find. If a match is found, then the index of thefirst character will be returned, otherwise -1 will be returned.

<int index> = str_indexOf( <string>, <find string>, [<startIndex>] );

Page 14: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 14

str_match( <regular expression>, <text> )

This function will check if the specified regular expression matches the specified string.

str_match(<regular expression>, <text> );if( str_match("[a-zA-Z]", "This is a text" );

str_replace( <Text>, <FindText>,<ReplaceText> )

Replaces all strings in a text with a specified text.

<String> = str_replace(<Text>, <FindText>,<ReplaceText>)

str_sizeOf( <string> )

Calculates the length in characters of the specified string and returns the length as an int.

<int size> = str_sizeOf( <string> );

str_subString( <string>, <beginIndex>, <endIndex> )

Returns the sub string between the specified beginIndex and endIndex.

<String sStr> = str_subString( <string>, <beginIndex>, <endIndex> );

str_xmlValue( <string> )

Converts the string to a string that can safely be used as an XML value.

<String sStr> = str_xmlValue( <string> );

Build generator specific

The functions below can only be used in the build generator scripts.

activateExcelSheet( <name> )

This function will activate the Excel sheet with the specified name, assuming that a sheet with this name has beencreated.

This function can only be used in a build generator that has the output file type set to Excel file.

Page 15: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 15

activateExcelSheet(<name>);activateExcelSheet("Sheet 1");

createExcelSheet( <name> )

This function will create a new Excel sheet. The sheet will be set as the active sheet. Use theactivateExcelSheet-function to switch to another already created sheet.

This function can only be used in a build generator that has the output file type set to Excel file.

createExcelSheet(<name>);createExcelSheet("Sheet 1");createExcelSheet(<name>)

getAudioEffects( <EffectChainId>, <Effect Separator> )

This function will return the audio effects for the AudioEffectChain with the specified audioEffectChainId. The effectswill be returned as a character separated string. The character(s) that separates the string can be specified as anargument.

<String> = getAudioEffects(<EffectChainId>, <Effect Separator>);

getAudioEffectsWithData( <EffectChainId>, <Effect Value Separator>, <Effect Separator> )

This function will return the audio effects and their data values for the AudioEffectChain with the specifiedaudioEffectChainId. The effects will be returned as a character separated string. The character(s) that separates theaudio effects in the string and the separator that separates the audio effects and their data values can be specifiedas an arguments to this function.

<String> = getAudioEffectsWithData(<EffectChainId>, <Effect Value Separator>,<Effect Separator> );

getContentFileName( <contentId> )

Returns the file name and local path (relative to where the user has set the content root).

<String fileName> = getContentFileName( <contentId> );

getDataFieldValue( <DataFieldName>, <dataId> )

Returns the value of the data field with the specified name and that belongs to the data with the specified id.*

Page 16: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 16

<String value> = getDataFieldValue( <DataFieldName>, <dataId> );

removeReservedTokens( <stringText> )

This method will remove all user defined reserved tokens from the specified string and return the string withouttokens.

<String stringText> = removeReservedTokens( <stringText> );

setExcelBackgroundColor( <column>, <row>, )<color>

This function will set the background color of a cell in an Excel sheet.

This function can only be used in a build generator that has the output file type set to Excel file.

setExcelBackgroundColor(<column>, <row>, <color>);setExcelBackgroundColor( 0, 0, "light blue" );

Colors can be:<Excel Color name>

setExcelCellBorder( <column>, <row>, <border>, <style> )

This function will set a cell border in an Excel sheet.

This function can only be used in a build generator that has the output file type set to Excel file.

setExcelCellBorder(<column>, <row>, <border>, <style> );setExcelCellBorder( 0, 0, "all", "double" );

Border Value can be: "all", "top", "bottom", "left", "right"Border Styles can be: "none", "thin", "medium", "dashed", "dotted", "thick", "double"

setExcelCellFont( <column>, <row>, <FontName>, <style>, <size> )

This function will set a cell font in an Excel sheet.

This function can only be used in a build generator that has the output file type set to Excel file.

setExcelCellFont( <column>, <row>, <FontName>, <style>, <size> );setExcelCellFont( 0, 0, "Times", "Bold", 20 );

Page 17: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 17

setExcelCellValue( <col>, <row>, <value> )

This function will set a cell value in an Excel sheet.

This function can only be used in a build generator that has the output file type set to Excel file.

setExcelCellValue(<col>, <row>, <value>);setExcelCellValue( 5, 1, "Test Value", 0);

setExcelColumnWidth( <col>, <width> )

This function will set a column width of an Excel sheet.

This function can only be used in a build generator that has the output file type set to Excel file.

setExcelColumnWidth(<col>, <width>);setExcelColumnWidth( 0, 50 );

setExcelRowHeight( <row>, <height> )

This function will set a row height of an Excel sheet.

This function can only be used in a build generator that has the output file type set to Excel file.

setExcelRowHeight(<row>, <height>);setExcelRowHeight( 0, 20 );

setExcelTextColor( <column>, <row>, )<color>

This function will set the text color of a cell in an Excel sheet.

This function can only be used in a build generator that has the output file type set to Excel file.

setExcelTextColor(<column>, <row>, <color>);setExcelTextColor( 0, 0, "red" );

Colors can be:<Excel Color name>

Cell renderer script specific

The functions below can only be used in the cell renderer scripts

Page 18: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 18

setBackgroundColor( <Column Name>, <Red 0-255>, <Green 0-255>, <Blue 0-255> )

This function will set the background color of the specified column on the currently rendered row. The column nameis the same as the variable without <$ $>.

setBackgroundColor(<Column Name>, <Red 0-255>, <Green 0-255>, <Blue 0-255> );setBackgroundColor("stringIdentifierName", 100, 220, 100 );

setFont( <Column Name>, <FontName>, <style>, <size> )

This function will set the font of the specified column on the currently rendered row. The column name is the sameas the variable without <$ $>.

setFont(<Column Name>, <FontName>, <style>, <size> );setFont("stringIdentifierName", "Dialog", "Italic", 20 );

setForegroundColor( <Column Name>, <Red 0-255>, <Green 0-255>, <Blue 0-255> )

This function will set the foreground color of the specified column on the currently rendered row. The column nameis the same as the variable without <$ $>.

setForegroundColor(<Column Name>, <Red 0-255>, <Green 0-255>, <Blue 0-255> );setForegroundColor("stringIdentifierName", 100, 220, 100 );

setExcel color list

The following colors can be used as parameters to setExcelTextColor and setExcelBackgroundColor

<color> RBG

red 0xff,0,0

bright green 0,0xff,0

blue 0,0,0xff

yellow 0xff,0xff,0

pink 0xff,0,0xff

turquoise 0,0xff,0xff

dark red 0x80,0,0

green 0,0x80,0

Page 19: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 19

dark blue 0,0,0x80

violet 0x80,0x80,0

teal 0,0x80,0x80

Grey 25% 0xc0,0xc0,0xc0

Grey 50% 0x80,0x80,0x80

periwinkle% 0x99, 0x99, 0xff

plum 0x99, 0x33, 0x66

ivory 0xff, 0xff, 0xcc

light turquoise 0xcc, 0xff, 0xff

dark purple 0x66, 0x0, 0x66

coral 0xff, 0x80, 0x80

ocean blue 0x0, 0x66, 0xcc

dark blue 0,0,0x80

pink 0xff,0,0xff

yellow 0xff,0xff,0x0

turqoise 0x0,0xff,0xff

violet 0x80,0x0,0x80

dark red 0x80,0x0,0x0

teal 0x0,0x80,0x80

blue 0x0,0x0,0xff

sky blue 0,0xcc,0xff

light turquoise 0xcc,0xff,0xff

light green 0xcc,0xff,0xcc

very light yellow 0xff,0xff,0x99

Page 20: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 20

1.

pale blue 0x99,0xcc,0xff

rose 0xff,0x99,0xcc

lavender 0xcc,0x99,0xff

tan 0xff,0xcc,0x99

light blue 0x33, 0x66, 0xff

aqua 0x33,0xcc,0xcc

lime 0x99,0xcc,0

gold 0xff,0xcc,0

light orange 0xff,0x99,0

orange 0xff,0x66,0

blue grey 0x66,0x66,0xcc

Grey 40% 0x96,0x96,0x96

dark teal 0,0x33,0x66

sea green 0x33,0x99,0x66

dark green 0,0x33,0

olive green 0x33,0x33,0

brown 0x99,0x33,0

plum 0x99,0x33,0x66

indigo 0x33,0x33,0x99

Grey 80% 0x33,0x33,0x33

automatic 0xff, 0xff, 0xff

Localization manager's guideExporting and importing translations

LocDirect can export out the source language strings into an Excel file with a column for the translator to addtranslations. The process usually looks like:

Page 21: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 21

1. 2. 3. 4.

1. 2. 3.

Export non-translated source language strings ready for translations into Excel fileTranslate Excel fileImport Excel file back into LocDirectRepeat until no more source language strings are added/changed and all strings are translated

When importing translations LocDirect will track and warn if any of the included source language strings havechanged since the export was created. 

Export templates

Export templates contain information of what folders and data to include in an export. The export templates arelocated in your project tree under Text Module/Export & Import Translations/ there's two sets available; one fordialogues and one for strings. This makes it possible to include different sets of data in your dialogue exports versusyour string exports. An export template needs to be created for each language that you want to export/importtranslations for.

Creating export templatesModifying export templates

Creating export templates

Click on Text Module/Export & Import Translations/Strings and select Create new Export TemplateSelect which languages you want to create export templates for (all selected by default)Include data columns that would be helpful to the translators We've selected String Description and Path

Page 22: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 22

3.

4.

5.

6.

Order can be re-arranged by selecting entries in Columns to export and clicking the up/down arrows to movethem. The top entry (String GUID) will appear in the left-most column in the Excel file followed by the StringIdentifier

Next define the template name. We recommend keeping the default name "<$languageName$> StringExport"

Page 23: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 23

6.

1. 2. 3.

After clicking Finish the server will generate export templates for the selected languages under TextModule/Export & Import Translations/Strings/

Modifying export templates

After batch creating all export templates for all languages you can edit them individually. This can be handy shouldyou want to include specific data in only one language, say your project have two versions of French, one fromFrance and one Canadian. For reference it can then be handy to include the French(France) translations in theFrench(Canadian) export should there be existing French(France) strings. 

Adding a reference language to a export template

Click the export template you wish to edit and select Edit this Export TemplateGo to the Select columns tabAdd the additional data field(s)

Exporting and importing

Once export templates has been generated, one or several (hold down Ctrl) can be selected by clicking on them. Tostart the export select Start Translation Export.

Export translationsExport file format (.xls)

Page 24: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 24

1.

2. 3. 4. 5.

6.

7.

8.

Column: IDColumn: String IdentifierColumn: Old Source Language TextColumn: Source Language TextColumn: Target language Text (Translation)

Import translationsDealing with import warningsWarning export logic

Export & Import ExampleCreating a Export templateStarting Swedish Translation exportData changeStart ImportImport warnings export

Export translations

Select the export templates you wish to export by clicking on them (hold down Ctrl to multi select) then clickon Start Translation Export. The various languages (export templates) don't have to be exported at the sametime.If you have no previously saved setting file then leave the Selected export settings file input field blankSelect export format; most common and recommended format is Excel format (.xls)The look of various fields can be configured if Excel format is usedCheck Protected Excel Sheets box if you want to make some areas protected in Excel (default disabled)

Select the output directory for the export files. If left blank the files will be exported into the LocalizeDirectinstall folder, usually "c:\Program Files (x86)\LocalizeDirect\"Check Export strings that don't require translation to include strings that are marked as not requiringtranslation (default enabled)Check Export already translated strings to include already translated strings in the export (default enabled) Allowing this option can make it easier for the translators to understand context and also makes it possible forthem to correct any previous translations.

Page 25: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 25

8.

9.

10.

Each export template included in the export will generate a file. Under each export the amount of strings thatneeds to be translated is shown, Click Preview to view a preview file, if Excel format is used this will openExcel automatically. Verify the files and chose Finish or Cancel. Finish will generate final files and create abaseline snapshot that will be used to track changes. Cancel will remove the generated files and no baselinesnapshot will be generated.

Clicking Finish will generate an export item under each of the exporter export templates and correspondingfiles in the selected output directory Double clicking on a export item or selecting Open Export File will open the file in Excel (if .xls format is used)

Page 26: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 26

10.

The export items corresponds to files generated in the selected output directory

Export file format (.xls)

Depending on the settings in the the amount of columns may vary, however the following columnsExport templatesare always included:

Column: ID

Contains a unique database name generated by LocDirect for the string and is used to match the string whenimported again. This column should never be edited as doing so will result in faulty imports. 

Column: String Identifier

This is the given string identifier of the string and matches the string identifier column in LocDirect. This columnshould not be edited but can contain useful information.

Column: Old Source Language Text

If a source language text with a previous imported translation is changed this field will contain the original sourcelanguage text with changes highlighted. This field is used to that the translator easily can see what haschanged. This column will be empty the first time an export is generated. 

Column: Source Language Text

Contains the source language text as it was when the export file was created. This is the field that the translatorshould translate. It can contain text highlights to highlight changes.

Orange Indicates that the field has changedsince last import

Column: Target language Text (Translation)

Contains the target language translation text as it was when the export file was created. This is the field that shouldbe edited by the translator. A translation of the Source Language Text column should be added in this column.

Yellow No translation exist, please addtranslation into field

Page 27: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 27

1.

2. 3. 4. 5.

1.

2.

3.

Yellow with note No translation exist, see warningnote

Orange Translation is out of date, pleasecheck and if needed updatetranslation

Orange with note Translation is out of date withwarnings note, please check and ifneeded update translation

Import translations

When translations have been added to the exported file it is ready to be imported into LocDirect. Each language fileis imported separately. 

Select the export entry you wish to import and select Start Translation Export

Navigate to the export file containing the translationAssign the translations to a user in the systemVerify that the columns are correctly alignedStart the translation import 

Dealing with import warnings

When importing a file LocDirect will list any warnings. It is important to understand the various type of warnings sothat they can be dealt with correctly. Warnings can be sorted and multiselected. Same type of warnings can beselected by right clicking "Select all warnings of this type". When a warning is selected additional information can befound in the detail view. Normally you have 3 options of how to deal with a warning:

Overwrite ExistingThis will force the translation from the import file into the LocDirect database overwriting any existingtranslation.SkipThis will remove the warning from the warning list and the translation will not be processed. Whatever existedin LocDirect database prior to the import will remain.Leave in warnings listWarnings left in the list can be included in a new warnings export

If in doubt about what to do the safest option is to leave the warning(3) in the list andcreate a warning export

  

Page 28: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 28

If there's existing warnings listed, clicking Finish will prompt the system to ask if you want to create a warningsexport. This is normally a good idea as the warnings will be included in the export as feedback to the translator. 

Warning type Likely cause Recommended action

String Identifier unknown Import file contains bad data rows,developer has deleted strings

Verify import file, Skip

Too many characters Developer has defined maximumamount of characters

Leave warning and create newwarning export

Too many pixels Developer has defined maximumamount of pixel length

Leave warning and create newwarning export

Out-of-date The source language text has beenchanged after the export wasgenerated

Check what has changed in thesource language, if change doesnot affect translation then Overwritecan be used to force translation intothe system. Otherwise leave andcreate new warning export

Out-of-date, older translation exists The source language text has beenchanged after the export wasgenerated

Check what has changed in thesource language, if change doesnot affect translation then Overwritecan be used to force translation intothe system. Otherwise leave andcreate new warning export

Out-of-date, newer translationexists *

The source language text has beenchanged and a new translation wasadded

Leave warning and create newwarning export

Newer translation exists indatabase *

A new translation was added toLocDirect after export was created

If you want to keep the translation inLocDirect use Skip, alternativelyyou can leave the warning andcreate new warning export

String Duplicate Strings with non unique ID exists inimport file

Verify import file. Skip

Empty translation A target language field is empty Skip or leave and create newwarning export

Empty row (or String Identifier) Empty row exist in import file Verify import file. Skip

String Folder Locked forTranslations

Destination folder of string wastoggled to not ready for translationpost export generation

Skip

Page 29: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 29

Status manually changed tore-translate *

Translation status was manuallychanged from Translated (green) toOut-of-date (yellow) post exportgeneration

Check if translation matches sourcelanguage in LocDirect if soOverwrite else leave and createnew warning export

Status manually changed totranslated *

Translation status was manuallychanged from Out-of-date (yellow)to Translated (green) post exportgeneration

Check if translation in LocDirectmatches source language inLocDirect if so Skip else leave andcreate new warning export

Warning export logic

Warning type Color Target language field Note

String Identifier unknown  Previous import file Text from previous importfile and warningdescription

Too many characters  Previous import file Warning text containingsize restriction info

Too many pixels  Previous import file Warning text containingsize restriction info

Out-of-date  Previous import file Warning text

Out-of-date, oldertranslation exists

Previous import file Text from previous importfile and warningdescription

Out-of-date, newertranslation exists 

LocDirect Database Text from previous importfile and warningdescription

Newer translation exists indatabase

LocDirect Database Text from previous importfile and warningdescription

String Duplicate  Last instance from importfile

Text from previous importfile(last instance) andwarning description

Empty translation  Empty Warning description

Empty row (or StringIdentifier) 

N/A String not included inwarning export

N/A

Page 30: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 30

String Folder Locked forTranslations 

N/A String not included inwarning export

N/A

Status manually changedto re-translate

LocDirect Database Text from previous importfile and Warningdescription

Status manually changedto translated

LocDirect Database Text from previous importfile and Warningdescription

Export & Import Example

Say we have a project with 4 strings, 3 of the strings are located in the root Strings folder and the 4th string islocated in the WIP folder. The WIP folder is marked as not ready for translation. The source language is English andthe target language is Swedish. View of Strings folder (with "List strings in subfolders" disabled)

In the WIP folder there's one string, notice the red dot in the WIP folder icon in the project view. This means that thisfolder is tagged as not ready for translation.

Creating a Export template

We go to Export example/Text Module/Export & Import Translations/Strings/ and select Create new Export Template

Page 31: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 31

We add the Path column to Columns to export

We make no changes to the Export Template Name (we use default)

Page 32: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 32

1.

2.

Once the Export template is created it will be show up in the project view as Export example/Text Module/Export &Import Translations/Strings/Swedish String Export

Starting Swedish Translation export

A translation export can be triggered either by:

Selecting the target language Export template - multiple languages can be selected by holding down CTRL,then right click and select Start Translation ExportSelect the folder you want to export (sub folder will be included), in our case it is the Strings root folder, thenright click and select Export Translations

Once an export is started we'll use the default settings:

Page 33: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 33

Page 34: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 34

Once the export has finished a new export entry is added the the Swedish String Export in the project view

As no output directory for export was defined the export file will be added to the LocDirect install folder,

Page 35: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 35

1. 2. 3. 4.

usually "c:\Program Files (x86)\LocalizeDirect\". A file named "Export example_2011-06-20_11.47.08_svSE.xls" wascreated. When opened this file will look like:

Notice that only 3 strings are included, the 4th string located in the WIP folder has not been exported as it wasmarked as not ready for translation. Adding translations to the file we get:

We'll save this file with the same filename.

Data change

There will normally be a time gap between an export and an import, during this time there may be changes to thestring data in LocDirect. In our example we will make the following changes:

Add a new string String_4 to the Strings folderChange String_3 source text from "Resume" to "Resume to main menu"Add a Swedish translation "Meny" to String_2Switch the WIP folder to "Ready for translation"

Viewing the Strings folder in LocDirect after the changes will show:

Notice that the red dot on the WIP folder icon is gone and that the status for string_2 has changed to translated(green).

Start Import

start the import by clicking on the export entry and selecting Start Import

Page 36: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 36

Navigate to the .xls file containing the Swedish translation and select it. A preview will be shown, make sure that thetranslations are lined up under the Target Language column.

LocDirect will report that the import has warnings:

Page 37: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 37

Clicking OK followed by next will list the warnings, selecting the first warning (string_2) will show more detailedinformation about it:

Page 38: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 38

1.

2.

3.

The information given contains both the target language and source language contained in the import file as well asin LocDirect. There's 3 choices how to handle this warning:

Overwrite Existing - will force the translation contained in the import file into LocDirect and then remove thewarning from the list. Swedish translation after import "Huvudmeny"Skip - will remove the warning from the list and the current translation in LocDirect will remain. Swedishtranslation after import "Meny"Do nothing and generate a warning export. If no warning export is generated the result will be as point 2

For this example we will go with option 3 and leave the warning to be included in the warnings export.

Clicking in String_3 gives:

Page 39: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 39

1.

2.

3.

This shows that the source language text has been changed since the export, the change is highlighted in green inthe Source Language Text in Database field. Again we got 3 options:

Overwrite Existing - will force the translation contained in the import file into LocDirect and then remove thewarning from the list. Swedish translation after import "Återgå"Skip - will remove the warning from the list and the current translation in LocDirect will remain. The text willremain un-translatedDo nothing and generate a warning export. If no warning export is generated the result will be as point 2

Again we will go with option 3.

Export Warnings export

Click Finish. LocDirect will now ask if we like to generate a warning export, select Yes.

The warnings export will be done using default settings.

Page 40: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 40

A warning export entry will be added to the project view:

Looking at the generated .xls file:

Page 41: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 41

This file will go back to the translators who should be asked to translate all yellow Swedish text fields as well asupdating the orange fields. The translated file may look like:

Import warnings export

Importing this file produces no warnings:

Translator's guideStarting out

Once you have logged in you will see a directory view in the top left corner with the available projects.

Page 42: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 42

If you expand the tree, you will be able to view the strings folders. There are two folder locations for strings,Dialogues and Strings. They will be housed in either dependant on string type.

Page 43: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 43

Ready for translation

If there is a red dot on the folder it means that the folder is NOT READY for translation. You will notice that thecolumn containing the French translation strings is grey and you will not be able to add or amend in this column.

Page 44: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 44

Once a folder (or number of folders) has been set as READY FOR TRANSLATION then this red dot will not appearand you will be able to add and edit in the target language column.

Page 45: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 45

Searching for text

You can perform a quick search by entering the text you are looking for here. All instances of the text you arelooking for will be shown in the main view and will include text in source text, target text and any other columns.

Page 46: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 46

You can perform a more advanced search by using the column filter. Click on the column filter icon found towardsthe top right of the interface and it will appear. Then enter the text you are looking for in the appropriate column. The

Page 47: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 47

column filter will only search on a per column basis. You can however enter text in multiple columns if desired tofurther narrow your search.

Adding translations

When a string folder has been opened, strings will appear in the main view and you can edit directly into thetool. You can enter your translation in the main view or in the detail view at the bottom of the screen.

Once you are happy with your translation please save by clicking on the Disc icon at the top of the interface (orCtrl+S as a shortcut) and your translation will then be immediately available.

Cut and paste shortcuts work in much the same way as excel. You can select a string and then hold SHIFT to selecta batch of strings or hold CTRL to select specific strings.

Please note that if you copy into excel and then plan to paste back into the tool that you should ensure that nochanges have been made to the strings in-between this movement. Strings can be added or altered at any time soplease check that the translations are being entered into the correct strings.

Page 48: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 48

List Strings in Sub-folders functionality

This is an extremely important function and can be found here.

Page 49: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 49

If the list strings box is checked (a tick appears in the box) then not only will string content from the currentlyselected folder be displayed but the view will also include content from all sub folders. If the topmost project stringfolder is selected and then ALL project content will be displayed. If you combine this with a column filter then youcan very quickly review and locate desired content. If you wish to review a particular folder then deselect this Listfunction and solely content from the selected folder will be displayed.

Status indicators

Status indicators will assist with highlighting amended source language strings.

A red indicator will denote that a new string has appeared that requires translation.

Page 50: Localize Direct Manual 1. User's guides...String Type can have it's own cell renderer script. For example, let's say that we would like to change the back-ground color of the cell

Localize Direct Manual

Copyright © 2015, Localize Direct AB Page 50

A green indicator will denote that the string has been translated.

A yellow indicator will denote that the string previously translated has been updated and requires retranslation.

You can sort the column by clicking on the flag at the top of that column.