BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Sanjeev
Fluorite | Level 6

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?

1 ACCEPTED SOLUTION

Accepted Solutions
MichelleHomes
Meteorite | Level 14

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

//Contact me to learn how Metacoda software can help keep your SAS platform secure - https://www.metacoda.com

View solution in original post

3 REPLIES 3
MichelleHomes
Meteorite | Level 14

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. Smiley Wink

Kind Regards,

Michelle

//Contact me to learn how Metacoda software can help keep your SAS platform secure - https://www.metacoda.com
Sanjeev
Fluorite | Level 6

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

MichelleHomes
Meteorite | Level 14

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

//Contact me to learn how Metacoda software can help keep your SAS platform secure - https://www.metacoda.com

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1509 views
  • 4 likes
  • 2 in conversation