cancel
Showing results for 
Search instead for 
Did you mean: 

Anonymous user language switching

Former Member
0 Kudos

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&#128;</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.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi All,

Any ideas..?

Did I miss any server level configurations.

Thank you.

0 Kudos

Hi,

we are also facing the same issue, If you got any solution kindly please let me know.

former_member193577
Active Contributor
0 Kudos

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

Former Member
0 Kudos

http://scn.sap.com/community/enterprise-portal/blog/2015/05/22/the-enterprise-portal-language-ep-a-s...

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