cancel
Showing results for 
Search instead for 
Did you mean: 

ISA B2B

Former Member
0 Kudos

Hi,

I need to add a link in a jsp page. This link should be displayed only when the language is Norway. This link should be shown only for the norway customers.

So in the jsp i need to use the condition if language = Zn then show the link.

So if someone has implemented this could you please help me out as how do i specify the condition in jsp.

Thanks,

Suvarna.

Accepted Solutions (0)

Answers (1)

Answers (1)

prashil
Advisor
Advisor
0 Kudos

Hi,

You can two approach for the requirement.

1) Identify the user language setting and then put the conditional statement to display the link.

2) Other is to add a key in the .xlf file and display the value of the key in the JSP.

Both of these approach have its own pros and cons.

For the first approach, it is easy to implement but it'll very difficult if you extend the this link to any other language.

For second, its lil hectic but extending to different languages will be lot easier and you don't have to recognize the user language setting, it will be by ISA standard code for you.

Hope this will give you a direction.

Regards,

Prashil

Former Member
0 Kudos

HI Prashil,

I need to use the first option. I need to identify the user language and need to put the conditional statement.

So how do I get the user language?

Thanks,

Suvarna.

prashil
Advisor
Advisor
0 Kudos

Hi Suvarna,

For the first option, to identify the user local language,

the following code needs to be added:

//

UserSessionData userData = UserSessionData.getUserSessionData(theSession);

Locale locale = userData.getLocale();

Sting lang = locale.getDisplayLanguage();

To get more methods of the locale, please the visit the link:

http://java.sun.com/j2se/1.4.2/docs/api/java/util/Locale.html

Hope this will answer your query.

Regards,

Prashil