cancel
Showing results for 
Search instead for 
Did you mean: 

multi-language with URL-iViews

Former Member
0 Kudos

hi folks,

I have the following little problem:

Our EP is mostly based on URL-iViews to static HTML-sites in german. Now, we are planning to extend the EP with an english Version. The Users should see the portal in the language they choose in the portal personalization menu.

My first thought was to use the portal-content-translation but this doesn't work for URL-iViews, as there is almost no text to be translated.

Now, my idea is to put a little script between the portal and the HTML-sites that checks the chosen language and redirects the user to the specific version.

The Problem is, I have no idea how to do that.

It would be really nice if anyone could tell me how to do this or maybe you have a better solution for my problem.

Thank you in advance for your efforts.

Kind regards

Norbert

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You can create an iview with sap application integrator and then in the URL property for that iview, you point it to an jsp page which will redirect user to different pages in different languages. Also in the URL to that jsp page, use =<Request.Language> to determine the user's language preference, i.e. http://server_path/redirect.jsp?lang=<Request.Language>.

Also see this

http://help.sap.com/saphelp_nw04/helpdata/en/70/5a3842134bad04e10000000a1550b0/frameset.htm

Former Member
0 Kudos

Thank you very much I guess that will work

Yesterday evening it occured to me maybe I think to complicated.

Isn't there an other way e.g. a "build-in-feature" to solve my problem?

The disadvantage in solving it with a script is that I have to write a script for every single URL-iView.

That doesn't sound like a good solution to me.

It would be realy nice if anyone could give me a hint how I could do this in another way.

Thank you very much

Edit:

I solved the problem with application integrator (thanks to Grace Pu) and a script that gets two parameters:

- the language

- the page to which the user should be redirected

Message was edited by: Norbert Stroh

Message was edited by: Norbert Stroh

Former Member
0 Kudos

Hello Norbert,

with the <request.language> parameter it should also be possible to dynamically build the URL to your content from within the URl iView.

Like the URL http://yourcontentserver.com/<i><request.language</i>>/content1.html

which will be "translated" by the portal either e.g. into http://<yourcontentserver.com/en/content1.html.

Seems like the easiest way for me - if your content is structured this way on the web server...

kr,

Michael

Former Member
0 Kudos

Hello Michael,

unfortunately that doesn't work.

If I put an URI like http://yourcontentserver.com/<request.language>/content1.html

in the URI file of the URL-iView Editor and after that on preview I get the following error: page could not be found

When I use a PHP-Script to catch the variable like http://yourcontentserver.com/index.php?lang=<request.language>;

I can't put it like that in the URI field cause I can't save it.

When I use the URL-parameter fields and enter "lang" and "<Request.Language>" I get the following URL as an result:

http://yourcontentserver.com/index.php?lang=%3CRequest.Language%3E

As you can see, the variable isn't "translated".

Maybe you could I didn't understand you right?

Message was edited by: Norbert Stroh

Former Member
0 Kudos

Hello Norbert,

please try an URI like:

http://yourcontentserver.com/<Request.Language>/content1.html

As I know the <Request.Language> is case sensitive.

Use the App Integrator iView (com.sap.portal.appintegrator.sap.Generic) instead of the URL iView with an URI like above.

Which helped me.

Regards

Former Member
0 Kudos

Hello Sven,

Thank you very much but I already figuerd that out by myself

Nevertheless thank you for your help

Regards

Former Member
0 Kudos

Hello Norbert...

Can you please share how you solved this?

Thanks,

BK

Answers (0)