Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dynamic translation not possible at 100%?

Hi Everyone,

I have already checked on the "Finance Controlling" applications to see how to make my qvw document multi-lingual but I have still 2 situations where I can't find a way to traduce.

I explain:

1) Pivot Tables:

In my pivot tables, I can see the names of my fields but they are not multi-lingual. How can I get them translated dynamicaly?

2) In a Bar chart:

My legend is composed of the content of the field of one of my dimension. But how can I get them translated dynamicaly?

Thank you very much for your help 🙂

14 Replies
Not applicable
Author

Trying to send the attachment again.

Not applicable
Author

To add data into the translation table from field values you could do:

-- Create the translation table

CREATE

TABLE [dbo].

[TranslationTable]

(

[Language]

NVARCHAR(50),

[TextToTranslate]

NVARCHAR(50),

[Translation]

NVARCHAR(50),

)

GO

-- Insert values from a field for first language

INSERT

INTO

[TranslationTable]



(

[Language]

,

[TextToTranslate]

,

[Translation]

)

SELECT

DISTINCT

'English',

[YourField]



,

[YourField]

FROM

[YourTable]

WHERE

LTRIM(RTRIM(ISNULL([YourField] , ''))) <> ''

GO



-- Insert values from a field for second language (to be translated)

INSERT

INTO

[TranslationTable]



(

[Language]

,

[TextToTranslate]

,

[Translation]

)

SELECT

DISTINCT

'Swedish',

[YourField]

,

[YourField]

FROM

[YourTable]

WHERE

LTRIM(RTRIM(ISNULL([YourField] , ''))) <> ''

GO



-- Then go in and translate the rows for the second language in Management Studio (for MS SQL)

SELECT

* FROM [TranslationTable] WHERE [Language] = 'Swedish' AND [TextToTranslate] = [Translation] ORDER BY[TextToTranslate]



Not applicable
Author

Yet another version with some more objects translated.

Not applicable
Author

Hi Roland,

I would like to make the mapping load but I don't know how to do it..

I have made some researches and tests but I can't get it working. Here is what I have in my script:

FieldsMapFR:
Mapping LOAD * INLINE [
REV_SubRubric, REV_SubRubric_FR
Means of payment processing, Moyen de traitement des paiements
Product & Services, Produit & Services
Local Electronic banking, Banque Local Electronique
Float, Flottement
Interest Margin, "Marge d'intérêts"
BTS, BTS
];

MAP Revenues using FieldsMapFR;

Revenues:
LOAD Corporate_Id,
Rubric as REV_Rubric,
[Sub-Rubric] as REV_SubRubric,
Product as REV_Product,
YYYYQQ as REV_YYYYQQ,
Revenues
FROM
[Data\Facts Tables\REV_Facts.xlsx]
(ooxml, embedded labels, table is REV_Facts) WHERE 1=1;

REV_SubRubric is the field where my values are. Like in the following example:

Corporate_IdRubricSub-RubricProductYearQuarterYYYYQQRevenues
XF&CMeans of payment processingDomestic Transfers2009Q12009Q117511
XF&CLocal Electronic bankingOther electronic banking2009Q12009Q168
XIM, Float & BTSFloatFloat2009Q12009Q114806
XIM, Float & BTSInterest MarginInterest Margin2009Q12009Q1246320
XIM, Float & BTSBTSRevenues on LORI account2009Q12009Q1341
XIM, Float & BTSBTS

Transfer fees

2009Q12009Q1

1185

Now, I don't know how to use that for my chart. Could you help me with that?

Is that going to work at runtime when user change its language?

If this works, does that mean that I need to do a map table for each language I want to be available?

Thanks for your help,

Best Regards,

Caro.

Not applicable
Author

Hi again Roland,

I finally managed a solution. In my load script I have now the following:

Revenues:
LOAD Corporate_Id,
Rubric as REV_Rubric,
[Sub-Rubric] as REV_SubRubric,
Product as REV_Product,
YYYYQQ as REV_YYYYQQ,
Revenues
FROM
[Data\Facts Tables\REV_Facts.xlsx]
(ooxml, embedded labels, table is REV_Facts);

FieldsMap1:
LOAD * INLINE [
REV_SubRubric, REV_SubRubric_FR, REV_SubRubric_DE
Means of payment processing, Moyen de traitement de paiements, Means of payment processing
Product & Services, Produit & Services, Product & Services
Local Electronic banking, Banque électronique locale, Local Electronic banking
Float, Flottement, Float
Interest Margin, "Marge d'intérêts", Interest Margin
BTS, BTS, BTS
];

which give me the following tables:

Then I changed my REV_SubRubric dimension in a calculated dimension like this one:

=If(GetFieldSelections(Language_Id) = 'FR', REV_SubRubric_FR, (If(GetFieldSelections(Language_Id) = 'DE', REV_SubRubric_DE,REV_SubRubric)))

And it worked.. 🙂

Do you think that this is a good way of programming? If you have any other better solution I am still open to it 🙂

Thanks,

Caro.