Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Localization

I am working on a qv app that supports localization and I have not seen any information on how to dynamically change the number and date formats based on a selected language. For example, if my app supports two languages, English and Spanish, when I choose Spanish I want to display all numbers as '999.999.999,00' and when English is chosen automatically revert back to English notation. In the macro that changes the language I've tried changing the "ThousandSep" and "DecimalSep" system variables but this does not seem to do anything. Has anyone been able to dynanically change number/date formats?

1 Solution

Accepted Solutions
mov
Employee
Employee

It is possible to use conditional formatting directly in expression. Here is what I did with the data formatting depending if it is US or not:
date(Date, if(Location='US', 'MM/DD/YY', 'DD/MM/YY'))
(Location is a variable in my case)

View solution in original post

4 Replies
mov
Employee
Employee

It is possible to use conditional formatting directly in expression. Here is what I did with the data formatting depending if it is US or not:
date(Date, if(Location='US', 'MM/DD/YY', 'DD/MM/YY'))
(Location is a variable in my case)

Not applicable
Author

Thanks for the tip. I was hoping that I could change the system variables on the fly, which would propagate to all numbers/dates displayed. While the conditional formatting would work, the scripts could get a little lengthy given that I need to support 10 languages/locales...and the list will continue to grow. If I happen to run across anything I'll be sure to share.

johnw
Champion III
Champion III

How about tying the number formats to the language with a formatting table:

Language; Decimal Format; Integer Format; Date Format
English; #,##0.00; #,##0; MM/DD/YY
Spanish; #.##0,00; #.##0; DD/MM/YY

Force one and only one selection for Language, then use the desired format in the expression.

num(sum(Value),"Integer Format")

Might work. When you add a new language, you only have to add another row to one table in the script and reload. Or if desired, you could externalize the formats in an Excel spreadsheet or whatever you want.

Not applicable
Author

This works perfectly...appreciate your help.