TRANSLATIONS OF LABELS VIA THE LANGUAGE FILES

Expressions for translation of text and labels

By default, on the "Empty.rep" report, the labels on already automatically translated via the language files.

1.Page header - COMPANYDATA - It contains the data for the Company details, that will print on the Page header of each report (except document layout files. debtor statements and creditor remittance advises).

2.Page footer - Company name, Path of the Set of Books, User names, page numbers and date time stamp.

If you have copied the Page footer from another report, the labels are also automatically translated via the language files. 


Labels for reports are added as follows:

1. - This icon will insert a static text label  "TRpLabels", which is not translatable via the language files. In the Text tab you need to enter the text to print on the report. The static text labels added in the Detail section of the report structure is not translatable via the language files. 

2.- This icon will insert a blank expression "TRpExpression", which by default is "2+2". To add a translatable label, you need to add (replace) the basic SQL with the standard SQL as follows:

CUSTOM('GETTEXTLANG',1252,'Telephone 1',0,0,0)

In this example, to make Telephone 1 translatable, is as follows: 

1252 = The language id as in the language files. 

Telephone 1 = Language description. This description will by default be displayed on the report, if the translation id is invalid. 

You may copy the expression and paste it on your report. You only need to change the language id (number) and description for new labels.  


Identify the required labels 

You may identify the labels needed from the printed report, or when the report is designed or edited. 

On your report, you need to make a list of all the expressions, for which you need to add translatable labels. Most of the required labels can be easily identified in the Expression names (database field names).

As per this example, the labels (static text) needed to translate. 

Expression (TRpExpressions) (database fields added)

Untranslatable labels (Static TRpLabel expressions)

Language id


Debtor list (report name) 

906045

ACCOUNT.SACCOUNTCODE

Code 

605

ACCOUNT.SDESCRIPTION

Description 

1708

ACCOUNT.STELEPHONE1

Telephone 1 

1252

ACCOUNT.STELEPHONE2

Telephone 2

1253

ACCOUNT.SPOSTAL1

ACCOUNT.SPOSTAL2

ACCOUNT.SPOSTAL3

ACCOUNT.SPOSTALCODE

Postal address

235

ACCOUNT.SDELIVERY1

ACCOUNT.SDELIVERY2

ACCOUNT.SDELIVERY3

ACCOUNT.SDELIVERYCODE

Delivery address

199


Before you start adding translatable expressions using the language files, you need to save your report. 

If you are busy to design or edit the report, close the "Report manager designer" screen. Remember to Save the report. 

Whenever you close the "Report manager designer" screen, after editing your report, remember save the report. If you click on No, on the "Save report?" confirmation message, your changes will be discarded (lost).

Find labels in the language file 

To find labels in the language file:

1.On the Setup ribbon, select Tools → Customise language.  

reportman-translatable-labels-find

If you type phone the label ID 974 - Phone: includes a colon :  - This colon is not needed in the label. In this case you may select Telephone or Telephone 1.

2.Search for labels and note the Language id's. As per this example, the labels (static text) needed to translate is noted:

Expression

Untranslatable labels

Language id


Debtor list (report name) 

906045

ACCOUNT.SACCOUNTCODE

Code 

605

ACCOUNT.SDESCRIPTION

Description 

1708

ACCOUNT.STELEPHONE1

Telephone1 

1252

ACCOUNT.STELEPHONE2

Telephone2

1253

ACCOUNT.SPOSTAL1

ACCOUNT.SPOSTAL2

ACCOUNT.SPOSTAL3

ACCOUNT.SPOSTALCODE

Postal address

235

ACCOUNT.SDELIVERY1

ACCOUNT.SDELIVERY2

ACCOUNT.SDELIVERY3

ACCOUNT.SDELIVERYCODE

Delivery address

199

3.Close the "Customise language" screen. 

Add translation expressions to the report

To add the translatable label expressions to the report:

1.On the "Report man" screen, select your report.

2.Select the Expression icon to insert a basic expression.  The default is “2+2

reportman-translatable-labels-add

3.Select the Expression and click on the icon of the Expression tab.

reportman-translatable-labels-add-sql

4.Add the language SQL to the report, referencing the language id and description.

You may copy the Phone on the Page header expression and its contents “CUSTOM('GETTEXTLANG',974,'Phone',0,0,0)” in the SQL area of the "Dialog" screen. 

Simply reference the language id 974 to the new language id and type in the description. For Debtor list (as per this example), the SQL should be; 

CUSTOM('GETTEXTLANG',906045,'Debtor list',0,0,0)

5.Click on the Show Result button. 

6.Click Ok on the "Information" screen. 

7.Click OK on the "Dialog" screen. 

8.Repeat the process for all labels. 

9.Once finished, click on the Print preview icon to check the report. 

10.Close the "Print preview" screen.   

11.Close the "Report manager designer" screen. Remember to Save the report. 

Whenever you close the "Report manager designer" screen, after editing your report, remember save the report. If you click on No, on the "Save report?" confirmation message, your changes will be discarded (lost).