Appendix 3 - How to translate the Crystal Master

Previous   |  Direct link to this topic

This appendix describes how to translate Crystal Report document masters from Boyum IT.

Requirements

You will need to have the Crystal Report Designer installed. Furthermore you need to turn on Multilanguage support for your database in order to test your translations.

How to translate

All translation of Crystal Masters is done in Crystal Report Formulas, so there is no requirement for external translation files or databases. This will give a sample on how to make the translation.

First locate the crystal report to translate and open it in the Crystal Report Designer:

clip0009

clip0010

As mentioned, all translation are done via formulas (No text are manually entered in the design surface) so let us focus on the Formulas fields in the document.

clip0011

As you can see there is a lot of formula fields in the report. Roughly 2 per information item.

In order to translation you will need to focus on the formulas fields that have the prefixed “Title_”

Example:

clip0012

clip0013

Here the “BpCode” holds the value of the Business Partner Code from the database while the description of the field in its translated value.

If you go through all formulas and translate inside the Title_ formulas you will have translated the entire document (More on how you do this technically later)

Before we translate lets, quickly look at how the language to use is determined. If you look at the end of the Formulas list there is a Formula called “X_Language” and this is the one that controls the language.

clip0014

Let’s have a look at the formula.

clip0015

The formula work on SAP internal Id’s of languages, 1, 3, 5, 8 etc… And translate it into the more human friendly name “HE”, “EN”, “PL” etc. We use a switch case to determine this and this also select the default language which in this case is English.

Translation the Title_ formula fields

Now we know enough to translate so let’s look at a few translation examples:

clip0016

We start off with a simple sample of translating the Title_Date… The translations already contains one or more translation. In our sample here we already support English, Danish, Norwegian, German, Spanish and Finnish and for this sample we wish to support Dutch (NL).

clip0017

Here is the formula without the new translation. We uses a switch to base on the X_Language to set the right translation. That means that if Language is ‘DK’ then it result ‘Bogføringsdato’, while if the Language is ‘FI’ then we get ‘Tositepvm’… If the current language is not represented it will default to the default language English.

Now let’s add Dutch as an example. From the X_Language we know that Dutch have code ‘NL’ so adding is quite simple:

clip0018

This formula is now translated is and we can move on to the next.

Not all formulas are quite as simple as this as it depends on BP type, document etc. In such cases there a multiple nested Switches but the process is the same. Here is a sample of Title_BP.

clip0019

And here is it after Dutch is added:

clip0020

The most advanced sample is the Title of the document. It is a long formula but the approach is as simple as the two above

clip0021

Should you have any question regarding translations then please contact support@boyum-it.com