- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm building a multi-lingual report and thus far I've managed to successfully implement French and English labels using the File/Localize Report.
However, I'm now trying to translate the data itself.
For example, I'd like to be able to create a calculated item as follows:
if (browser_local = 'EN') return DeptName_En
else
DeptName_Fr
Is there a way to reference the browser locale from the calculated item expression window?
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sanjeev,
I don't think you can embed your own Javascript within a SAS Visual Analytics report. This is why I made the suggestion I did.
Kind Regards,
Michelle
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sanjeev,
A very good question and technique that would be extremely useful to support users with different browser locale settings. I don't think the specific request you are asking, being able to take advantage of browser or VA server configuration settings as parameters is currently possible within SAS Visual Analytics Designer. It's an idea and feature that would be useful to support multiple locales and potentially other areas such as setting report size dynamically based on client device and device type, date formatting based on client preferences etc.
If this is a requirement you must have then a suggested work around would be to add another a data source to the report that contains the locales you want to support and a report prompt using the locale data item so that the user has the option to change the locale within the report from a default EN value to FR (or vice versa) depending on your user community. If you are using SAS Visual Analytic 7.1, you can create a parameter based on the report prompt value and use it within your calculated item. Have a look at parameters at SAS(R) Visual Analytics 7.1: User's Guide - Overview of Parameters
Hopefully someone from SAS can respond if there is a way to use the browser locale setting and future plans.
Kind Regards,
Michelle
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi Michelle,
Thank you for your response. Your suggestion may be my only option. But it made me think, what about JavaScript? Could I do the following?
1) Create my own Language prompt sourced from a second data source (as you suggested).
2) Then using a JavaScript call , get the browser locale and populate the language prompt accordingly.
3) Then reference the language prompt in a calculated item.
I just don't know where I can add the JavaScript.
Sanjeev
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sanjeev,
I don't think you can embed your own Javascript within a SAS Visual Analytics report. This is why I made the suggestion I did.
Kind Regards,
Michelle