Setting user language explictly?

Hi everybody,
We want to use e-mail notifications for KM and our portal is connected to an Active Directory 2003 server. The problem is that there is no language defined for the ADS users, so notifications are sent in English even if I change the default portal locale in prtdefault.properties and prtcentral.properties.
If I explicitly set a different language in the user properties page the notifications are sent in the correct language for that user, but there must be a way to change this setting automatically for everyone? I tried messing around a bit with the datasource config xml files, but I couldn't find a way to set a specific value for a field. This is on EP6 SP2 Patch 30.
Thanks in advance!

I see. I think I found the service responsible in the <i>com.sap.netweaver.bc.rf.service.par</i> file, by decompressing <i>bc.rf.global.service.notificator_api.jar</i> and  decompiling the AbstractNotification.class file. I will also try finding a more standard solution.
Thanks
UPDATE: We received a working solution from OSS, here it is if anyone else needs it.
In the J2EE server startup parameters, we added the following lines :
-Duser.language=<language code>
and
-Duser.region=<region code>
Now notification emails are sent in the correct language. Strange, because this setting according to the help document is at lower priority than the request.mandatorylanguage settings, but it works!
Message was edited by: Olivier Tremblay-Ross

Similar Messages

  • Set user language by code

    Hi  Experts ,
    I want to run an application that get the current portal user language ....
    Ask if it X set to Y , else do nothing .
    My questions :
    1.  Is it right to do so ....
    2. Code ???
    3. Where/When is the best way to run it ?
    I don't want to use the personalize option ..
    Thanks ..

    Hi,
    Refer tis links,
    Setting/Getting Available Languages in the portal using code
    Set a language on the portal application
    Regards,
    Kanagaraj.

  • Set user Language in URL IView

    Hello,
    I am trying to put the Language of the user in the parameters of the URL.
    For example :
    http://sopraganesh.cr.infra.lab/redirect.asp?page=ECD&lang=en
    How can I parameter the URL IView to automatically retrieves the language of the connected user?
    Thanks for your help,
    AN

    Hi
    Once you have defined the iView’s URL to the targeted Web page, you may need to configure parameters that are passed to the information source as part of the URL. In the URL iView Editor, you can do the following to URL parameters:
    ·        Add, remove, and modify URL parameters
    ·        Determine whether or not portal end user can view and personalize URL parameters at runtime
    ·        Assign intuitive display names to URL parameters that are viewed or personalizable by portal end users
    ·        Specify the URL request method (GET or POST)
    If you navigated to the targeted Web page and defined the iView URL using the portal built-in browser, the URL parameters and request method may already been defined in the URL iView Editor.
    Procedure
           1.      Open the iView in the URL iView Editor.
    The editor does not display URL-specific parameters in the URL address within the URL box. URL parameters that were part of the URL referencing the selected Web page (the information source) are automatically removed from the source URL and displayed in the URL parameter list in the editor. At runtime, the portal automatically appends the URL and the listed parameters to the targeted URL request.
           2.      In the Request Method option, choose either GET or POST to specify the request method. The request method indicates how the browser sends information to the information source:
    Request Method
    Description
    GET
    This request method appends parameters to the URL when the data request is sent to the information source. The server receives the data in one long query string, which typically limits the length of parameters that can be passed.
    For example, a URL using the GET request method would be: http://www.google.com/search.asp?&querystring=SAP where querystring indicates the parameter identifier and SAP is the parameter value.
    POST
    This request method sends parameters for the URL in the header of the data request stream; parameters are not appended to the URL. This allows for long parameters to be passed to a script and parsed one element at a time.
    For example, a URL using the POST request method would be: http://www.google.com/search.asp.
    POST is only supported when the Fetch Method property defined in the iView is set to Server-side. For more information, see URL iView Properties.
    For iViews that have a mixture of parameters sent by GET and POST together, you must:
    §         Choose POST as the request method.
    §         Set the Fetch Mode property to Server-side
    §         Append the GET_EXPLICIT_ prefix to the parameter identifier of each parameter that is sent by GET. For example, a parameter defined as searchstring should be defined as GET_EXPLICIT_searchstring. When the iView sends a data request, the prefix is removed from the parameter identifier at runtime. Parameters sent by POST do not require a special prefix. 
           3.      To add a parameter, click Add below the table. A new entry is added to the parameter list.
    To remove a parameter, select the checkbox of the relevant parameter in the list and click Remove. Before doing so make sure the parameter is not required by the information source.
           4.      Define the attributes of existing or new parameters, as follows:
    Attribute
    Description
    URL Parameter
    Specifies the parameter identifier as recognized by the information source. For example, in the URL http://www.google.com/search.asp?&querystring=SAP, the parameter identifier is querystring.
    As stated above, parameters that need to be sent by GET when the request method is defined as POST, must have the GET_EXPLICIT_ prefix. For example: GET_EXPLICIT_searchstring.
    Enter special characters that are present in the parameter identifier as is. Do not convert them to ASCII code. For example, enter first name, and not first%20name. At runtime, the portal will encode special characters to ASCII when fetching the iView data.
    Value
    Specifies the value of the parameter. This is not mandatory.
    If you set the parameter as a variable that can be personalizable by end users (see following attribute), then this value will be the parameter’s default value. However, if you set the parameter as not personalizable, then this value is the fixed value of the parameter.
    Enter special characters present in the parameter value as is. Do not convert them to ASCII code.
    Type
    Specifies the data type of the parameter.
    Choose one of the following options:
    ·        String: Apply this option for all data types whose property is not a mapped user name or password; for example, an integer or string.
    ·        Mapped User: Apply this option when the URL parameter designates a “user name” that is required to authenticate the user with the information source at runtime.
    ·        Mapped Password: Apply this option when the URL parameter designates a “password” that is required to authenticate the user with the information source at runtime.
    §         When Mapped User and Mapped Password are selected, the Value and Personalize attributes cannot be edited.
    §         If you want to enable user mapping for the user name and password parameters, in the System drop down-down list, choose an appropriate system already defined in the portal, which contains the necessary settings. See Selecting a System.
    Personalize
    Specifies whether or not portal end users can view the parameter and its assigned value if they personalize the iView at runtime. This attribute also allows you to determine whether or not end users can personalize the parameter value.
    Choose one of the following options:
    ·        Hidden: The end user does not see the parameter and its value. This is the default setting.
    ·        Read / Write: The end user sees the parameter and is able to modify its value.
    ·        Read Only: The end user sees the parameter and the fixed value assigned to it. The end user cannot modify the parameter value.
    Name
    Specifies an intuitive display name for the parameter identifier. If you set the parameter to be viewable by end users at runtime, this name is displayed instead of the parameter identifier, which is often abbreviated and unintuitive.
    This attribute is available only if Read / Write or Read Only is selected in the Personalize attribute. If you do not specify a name, the Personalize attribute will be reverted to Hidden.
    with regards
    subrato kundu

  • Setting user.timezone in jnlp

    I have no success in setting the user.timezone property through the jnlp-file. I have seen a similar experience reported a couple of years ago:
    http://forum.java.sun.com/thread.jspa?forumID=38&threadID=431709
    Is it doable?
    I can't set it in the code, because we are suffering from a timezone/thread-related bug reported (for instance) here:
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6352812
    Right now we are using aspects for the sole purpose of fixing this problem, but apparently that has it problems as well from time to time at the customer site.
    Thanks!
    /Claes

    I think the "user.timezone" is consided as "unsafe" and cannot be set by JNLP; similar complain can be found when setting user.language see: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4683242
    In fast there are only six properties considered to be �safe�:
    sun.java2d.noddraw
    javaws.cfg.jauthenticator
    swing.useSystemFontSettings
    swing.metalTheme
    http.agent
    http.keepAlive
    See http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/syntax.html

  • How to set selected Language from Portal dropdown in Logon to User profile

    Hi Gurus,
    I select a language in Portal Language dropdown in the Logon Page.
    After login in the content is getting displayed in the browser language.
    I want the portal content to be displayed in the selected language in the portal LogonPage.
    I checked the thread Logon page change to add a dropdown for language
    The is the requirement for me too .
    Kindly suggest me on how to set the language in the Portal user Profile so that the portal contents gets displayed in the selected languages from the dropdown .
    Thanks in Advance

    Hi Prasanna,
    The language that the portal is displayed in depends on the following
    heirarchy, with the languages at the top of the list taking precedence
    over those at the bottom:
    1. Component (iview) language (defined in the portalapp.xml)
    2. Portal Mandatory language (defined in the prtDefault.properties)
    3. User language (defined in the user#s profile).
    4. Request language (defined by the browser).
    5. Portal Default language (defined in the prtDefault.properties)
    6. System Default language (default locale defined by the OS).
    So for example, if you have your portal user language (as in point 3)
    set to Russian, but the language of the iView that is the logon page
    (as in point 1) set to English, that logon page will be displayed in
    English.
    Keeping the above in mind, please make the necessary changes to the
    configurations and check if it helps.
    Regards,
    Sowmya
    Edited by: Sowmya K on Jun 2, 2011 11:32 AM

  • Is there any way to set global language as english for users  in portal

    Hi,
    Is there any way to set global language as english for all the users  in portal (for all the screens,applications etc) irrespective of browser settings,language in jco,user settings in backend .
    the reason why i am asking is we are implementing global implementation project and for some users in switzerland because of their browser is not english they are getting language other than english.we dont want to ask each user to change their browser language.we just want to force the portal to display content only in english
    Thanks
    Bala Duvvuri

    Hi ,
    You can add property  'request.mandatorylanguage=<your_language>'
    and property  'request.mandatorycountry'
    on file 'prtDefault.properties' located in :
    ..server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\portal\system\properties\prtDefault.properties
    Then restart the server.
    See :
    http://help.sap.com/saphelp_nw70/helpdata/EN/42/938297a5061d69e10000000a1553f6/frameset.htm
    Regards,
    Gilad

  • How to set the language of a mail template from NotificationUtil?

    Hi experts!
    I've been having some issues with the Message Template Language when using the NotificationUtil to send an Email.
    How do I set the language of the template?
    Do i set this by the sender? Or do I need to reference the recipient?
    If so, how could I get the Account Object Interface from the user given that I got him as a collaborator?
    I wish you could help me out whit this language problem.
    Here's an example of the code I'm using:
    Properties params = new Properties();
    params.put(new String("PHASE_NAME"), faseName);
    params.put(new String("DOCUMENT_TYPE"), docType);
    params.put(new String("DOCUMENT_NAME"), contractName);
    params.put(new String("OWNER_FIRST_LAST_NAME"), owner.toString());
    params.put(new String("START_DATE"), fecha);
    params.put(new String("INSTRUCTION"), "");
    params.put(new String("DOCUMENT_HEADER_URL"), vinculo);
    String[] recipients = {mail};
    sender = session.getAccount();
    mailTypeEnum = new MailTypeEnumType(MailTypeEnumType.ODP_WORKFLOW_APPROVAL_REQUEST_MSG);
    NotificationUtil.sendNotification(recipients,sender, mailTypeEnum,params,null,null);
    Thanks in Advance!

    Hi vikram!
    Sorry for the still inconvenience, but I'm getting this error:
    Error in method invocation: Static method sendNotification( com.sap.odp.usermgmt.masterdata.UserAccountBo, com.sap.odp.usermgmt.masterdata.UserAccountBo, com.sap.odp.api.comp.messaging.MailTypeEnumType, java.util.Properties, null, null ) not found in class'com.sap.odp.api.util.NotificationUtil'
    Im making the code the following way:
    Properties params = new Properties();
    params.put(new String("PHASE_NAME"), faseName);
    params.put(new String("DOCUMENT_TYPE"), docType);
    params.put(new String("DOCUMENT_NAME"), contractName);
    params.put(new String("RECIPIENT_FIRST_NAME"), nombre);
    params.put(new String("OWNER_FIRST_LAST_NAME"), owner.toString());
    params.put(new String("START_DATE"), fecha);
    params.put(new String("ORG_UNIT"), orgUnit);
    params.put(new String("INSTRUCTION"), "");
    params.put(new String("DOCUMENT_HEADER_URL"), vinculo);
    recipients = IapiAccountLocator.lookup(session, collaborator.getPrincipal()); // This Changed.
    ( I also tried like this:
    IapiAccountIfc recipients = IapiAccountLocator.lookup(session, collaborator.getPrincipal());)
    sender = session.getAccount();
    mailTypeEnum = new MailTypeEnumType(MailTypeEnumType.ODP_WORKFLOW_APPROVAL_REQUEST_MSG);
    NotificationUtil.sendNotification(recipients,sender, mailTypeEnum,params,null,null);
    Thanks again!

  • Layout shows different data depending on user-language (German or English)

    Hello best of the best,
    we are using layouts to enter data into BCS. In one of our layouts different numbers are shown depending on the user-language (German or English).
    This is despite the same layout is used.
    Have you got any idea what could cause this problem?
    Is there a setting somewhere that I didn´t know up to now (to distinguish in different languages)?
    Better to ask SAP using an OSS-message?
    Many thanks in advance,
    Thomas
    If you need more information about that case, pls tell me.

    The numbers are volumes (KWh, to, l).
    There are several positions with different "Breatdown Categories". In the english version of the layout only the KWh-volumes are shown. "to" and "l" (Diesel) are missing.
    To describe the problem more clearly, in the german version the layout seems to show correct data:
    Position                KWh         to         l
    Diesel (l)                   -            -       5.000
    Coal (to)                    -        3.000      -
    Electricity (KWh)   200.000      -         -
    The "-" shows fields that are grey --> no data can be inserted
    The english version looks like this:
    Position                KWh         to         l
    Diesel (l)                   -             -          -
    Coal (to)                    -            -           -
    Electricity (KWh)   200.000  200.000  200.000
    Here the white fields at Diesel (l) and coal (t) are empty, but the grey fields in the col´s "to" and "l" show the value of "KWh" in electricity as well.
    Does this answer your question?
    br,
    Thomas

  • Mapping User Language vom LDAP to Portal Users

    Hi,
    Anyone knows how to map the user language available in an attribut from LDAP to the portal user language?
    (Working on NW04)
    Regards,
    Martin

    HI,
    For 2004s SP10,
    althought the manual tells you to use the preferredlanguage attribute in the datasource. Use the attribute 'locale' to map to your LDAP specific language attribute.
    example <attribute name="locale">
    <physicalAttribute name="preferredLanguage"/>
    </attribute>
    Use the 2-characters ISO language code set. For example en for English, nl for Dutch and de for German.
    Works fine for us.
    good luck,
    Joachim van Essen

  • Add to portal favorites works only in User-language english

    Hi,
    i've got a litte problem with the funktion "add to portal favorites".
    We use our portal to publish BW-Reports (BW7.0). Our development-language is english.
    Both system (BW and EP) are configured in english.
    In the portal (EP 7.0) we have the problem, that the "add to portal favorites" funktion works fine when the user-language is english. When the user-language is german only a few iviews can be added to the favorites....
    Does anyone have an idee where my bug is?
    Christian

    Hi Hema,
    Try this.
    Change the iView properties, these forces all BI reports to fire in EN,
    The setting in the iView of Application Parameters and set this to u201CLanguage=ENu201D.Then this Overrides the local setting of the Portal and forces a BW report to fire in EN.
    try this link :- Query in Portal User-Language-Independent
    Regards ,
    Sapbi3012.
    Edited by: Sapbi3012 on Jul 21, 2011 3:31 PM

  • Setting the language of the work item

    Hi gurus,
    Does anybody know if it is possible to set the language of the workitem in the workflow to a different language than the log on language? By adding an extra step maybe?

    Hi Tugrul Basar
    The language of a workitem (BOR Object WORKITEM) is set in SWWWIHEAD when the workitem is instantiated as a database attribute, so the bad news is there is no clean method to do this.
    But, you can put some extra logic in the workitem description to enable different languages, even though the language attribute in the object is set to logon language of WF-BATCH user.  In simple terms, you create a standard text (in SO10) for your new language texts and then put a case statement in the description.  Use exactly the same method and syntax as you would for SAPScript.
    Regards and good luck
    Gareth

  • Content Alignment in webdynpro iView based on user language

    Hi,
    We have a webdynpro application which has a search screen
    (Arabic as well as English), based on the user language setting in Portal UME, the respective language text with options are displayed.
    This webdynpro application runs on same WAS where Portal is running.
    When we test this application standalone like typing the URL of the webdynpro application, it shows english text with Left to right aligned content in browser for <b>user X with Language as EN</b>.
    When we test this application standalone like typing the URL of the webdynpro application, it shows arabic text with Right to Left aligned content in browser for <b>user Y with Language as Arabic</b>.It works fine when it is stand alone (when we directly run the webdynpro).
    <b>We created a WebDynpro iView in Portal, and we tested with user <i>Y (whose language is set to Arabic),</i> issue is text is properly displayed in Arabic, but the content alignment is left to right, which should be Right to Left</b>.
    Please let me know your solution/thought to the above mentioned issue/problem.
    Thanks
    Senthil

    Hi,
    The webdynpro application works fine (alignment and content is fine)when i access it directly.
    When i create a webdynpro iView and run it inside portal it is not working fine (alignment is LTR instead of RTL)
    I went through the SAP help <a href="http://help.sap.com/saphelp_nw04/helpdata/en/6e/8aae409567942ae10000000a155106/frameset.htm">RTL Alignment</a>and tried creating new themes and created a new desktop and assigned it to the user. It is still the same with LTR alignment.
    The issue is, why it is not working inside PRT, when it works fine inside WebDynpro Runtime.
    Thanks
    Senthil

  • How to set default language for Portal?

    Hi All,
    We use EP6.
    Default language is not defined and therefore is being set by the browser's language.
    Where do I set default language for all users?
    (I don't want that the users will be able to change it by themselves by browser/EU role).
    I tried to set the "request.mandatorylanguage" and
    "request.mandatorycountry" in prtDefault.properties but it didn't help.
    Thanks,
    Omri

    Hi Omri,
    are those to parameters
    request.defaultlanguage=...
    request.defaultcountry=...
    set in the prtDefault.properties, and the J2EE Server restarted after the change?
    Check out this thread and the link given there for more info: HOW to define the default language in the portal
    Hope this helps,
    Robert

  • ESS: InvalidUrlRuntimeException depend on the user language !?!

    Hi,
    I've a strange behaviour apparently related to the user language:
    - all the ESS JCO connection are set-up with SSO;
    - with an EN user everithing is OK;
    - with an EN IT language I get an InvalidUrlRuntimeException when I use
    "My Trips and Expenses" link.
    This link point to an EP ROLE://.... an it seems correct.
    If I take the complete URL reported in the error I can show the correct WebDynpro without any errors.
    Another strange think is that some services in the sub-area are not dispalied, only with a differen language than EN.
    Thanks a lot for any help.
    Regards,
    Andrea
    Edited by: Andrea Mello on Apr 7, 2010 4:43 AM

    The translated text contain '&' so the URL parameter was wrong

  • EP 6.0 - Setting preferred language before login

    Hello,
    We are currently looking at ways of allowing user to set their user language before logging in. On the logon page we want to provide a select box where user can select their default language. The user would enter the username, password, language and click logon button. Upon
    logon the Portal content will be displayed in the language selected. I looked in the logon component 'com.sap.portal.runtime.logon.par' on the logon page and there a portion of the code that checks if UME
    property 'ume.logon.locale' is set to TRUE and if that is the case it displays the language select. I've modified the UME property file '\usr\sap\J2EE\j2ee\j2ee_00\ume\sapum.properties' and everything displays correctly however upon logon the content language does not get set to the specified language. Can you tell me what I am  doing wrong? Am I missing anything and is this possible?
    <%
    if( UMFactory.getProperties().getBoolean("ume.logon.locale",
    false) ) {
    %>
    <tr>
    <td width="200" height="20">
    <label class="urLblStd" for="preferredlanguage">
    <nobr><%=logonLocale.get("LANGUAGE")%></nobr>
    </label>
    </td>
    <td >
    <select id="ume.logon.locale"
    name="ume.logon.locale"
    class="urDdlWhl" size=1>
    <option value="en">English</option>
    <option value="fr"><%=EncodeHtmlTag.encode
    ("Fran\u00E7ais")%></option>
    </select>
    </td>
    </tr>
    <%
    %>
    Thanks in advance,
    Rabih

    Hi Rabih,
    I'm having the same problem... Did you find a way to get this parameter working ?
    Thanks & regards

Maybe you are looking for