Get Free Trial

Is it possible to translate ocsv fieldnames without altering the datasource

abons asked on February 25, 2019

I’d like to change all labels client-side the same way as the report:
Flexmonster({global: { localization:lang } })
1. I don’t want to reload the data as seen in because the file is a lot bigger
2. I’d like to reuse saved report.json (presets) in different languages

3 answers

Dmytro Zvazhii Dmytro Zvazhii Flexmonster February 26, 2019

Thank you for your question. 
Currently, when you need to define the fields captions for the OCSV data source it can be done with SQL alias.
The possible solution can be the following: when it is time to load the localized pivot instance, you will apply the predefined SQL alias to your queries. It will return the data with the appropriate fields names. After that, you will need to apply the appropriate slice and localization file.
Please let us know in case of any other questions.

abons March 5, 2019

An alternative for client-side localization is, adding all fields (to rows,columns,reportFilters, or measures), with altered caption with runQuery() within reportcomplete() before setting the saved report (report fields also with caption).
This works for fields but not for hierarchy (like date).

Eventually we switched to translated data (SQL alias) because we also needed to translate saved reports containing filters with translated values

Dmytro Zvazhii Dmytro Zvazhii Flexmonster March 5, 2019

Thank you for your feedback.
We are glad that you have found a suitable solution for you.
Please let us know in case you need any other assistance from us.

Please login or Register to Submit Answer