on 07-22-2015 5:30 AM
Hi All,
We have a requirement to provide the language switching option for anonymous Login users. I have done the following
1. Created the custom masthead file and modified the code.
2. Created the custom framework page and assigned the custom masthead page to custom framework page.
3. For language switching I have created another JSP page which is calling from the masthead page link (in the JSP I have implemented the logic for language change)
4. Created the French and English users in portal UME as anonymous users.
5. Successfully showing the link according to the user language ( i.e., user language is set to French language then the link will be English, if user language is set to English then the link will be French.)
Masthead page code
-------------------------
<script>
//language
function changeLang(cLang)
{
var currentURL = window.top.location.href;
window.top.location.href="https://answers.sap.com/irj/servlet/prt/portal/prtroot/languageswitch?language="+cLang+"&cURL="+currentURL;
}
</script>
<%
if (isAnonymous){
{
%>
<%
if (langForProcessing.equalsIgnoreCase("English"))
{
%>
<a target="_top" href="javascript:changeLang('French');">arabic€</a>
<%
}
else if (langForProcessing.equalsIgnoreCase("French"))
{
%>
<a target="_top" href="javascript:changeLang('English');">ENGLISH</a>
<%
}
%>
<%
}
%>
Now the problem is when we click on the link simply it is going to access denied page. Please somebody give me some idea where exactly we have structed.
If we use the below link then the data is showing properly based on user language.
http://<host>:<port>/irj/portal/anonymous?guest_user=french (or) http://<host>:<port>/irj/portal/anonymous?guest_user=english
only problem with when I click on the link in the masthead.
Thanks.
Hi All,
Any ideas..?
Did I miss any server level configurations.
Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Is the languageSwitch a portal application or just a JSP?
you can have a portal application, setting the security zone for app to No Safety for anonymous access.
See details here:
https://help.sap.com/saphelp_nw73/helpdata/en/48/50badbb82971b9e10000000a421937/content.htm
Best Regards,
Tal
From the conceptional point of view Im not sure its a good idea to set one language for anonymous at all, since you have to assume you will have different user with different languages. Would be it better to rely on request language?
cheers
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.