on 10-19-2007 5:01 AM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
79 | |
9 | |
9 | |
7 | |
7 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.