on 07-02-2010 7:01 AM
Hi experts,
just a short question - how to get the language of the current system? I mean for example the language of the current Windows, NOT SAP!
Is there any function that gives me this?
Regards
Michael
There is no API to provide this. You should only rely upon the user logon language - SY-LANGU.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
may be then you can use SY-LANGU.
SY-LANGU
One-character language key with the useru2019s logon language (such as D, E, Fu2026)
As mentionded before - the user is logged on automatically as a "general" user - language is setted to german.
Now a user from England calles the Web Dynpro, is logged on automatically and the language is also german.
I want now the language to be set to english. But when I understand it right, I don't have any possibility to achieve this cause I can't "read" the system language (Windows language).
If the user's language is not explicitly set in their user record, then the sy-langu should get set according to the locale of the browser. Is this not the case? Try removing the language from the generic user's record.
I believe this should work - but have not been able to find any doco which supports this understanding - I know it is the case for WD Java, and I would assume the two would behave in a similar manner.
Chris
From the online help:
The logon language is determined or proposed from the sources listed below: These sources are evaluated in the order below whereby the first in the list is the decisive source.
...
1. sap-language URL parameter (see above)
2. Default language in the setting for the system logon
3. Web browser languages (Accept-Language)
4. Default language of the SAP system
The language from the user account in the SAP system is not evaluated.
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/7b/fb57412df8091de10000000a155106/frameset.htm
The language from the user account in the SAP system is not evaluated.
although this is in the doco - my own experience would suggest otherwise!
It may however, be that the language in the user account is used by the portal to determine locale - which is then passed through to the WD application.
changing the user language of the SAP user account certainly does change the default language of the portal log on.
[user changed to Spanish in user record - note portal app in Spanish|http://www.freeimagehosting.net/uploads/e9b4cbd069.gif]
now running the WDA in the same portal session - launches it in Spanish too...
[POWL (WDA app) in Spanish - you can see I have still a little work to do with some translations|http://www.freeimagehosting.net/uploads/7ce255ed51.gif]
so perhaps launching the WDA application directly for this user would not render it in Spanish - but it is definitely rendering and sy-langu is using 'ES' when launched from portal - and only change I made to the user to effect this - was to change the language in the user account.
Cheers,
Chris
You are correct that the portal would add another layer to this. When the portal calls a WDA via iView, it does pass the SAP-LANGUAGE URL parameter using the current portal logon language as the value. This is part of the reason why this URL parameter is listed at the top of the list processed by the ABAP AS - so the Portal can override everything else.
The portal can get its default logon language from the portal user profile:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/f8/64e93b3a612d52e10000000a11402f/frameset.htm
The interesting thing here is if you use the ABAP backend as your UME source for the portal, then the Portal User Profile Language setting will come from the User Account on the ABAP Backend. So although this setting isn't evaluated by the ABAP AS during logon, it can influence the situation (as you showed) via the Portal.
User | Count |
---|---|
81 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
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.