Internationalization - How obtain the preferred browser language?

Hi,
i have a webdynpro application in spanish and it is translated to english and portuguese too. I have two traductions
Translate 1 : views,simpletypes,messagePool (.xlf files)
Translate 2 : r3 data (descriptions, names...) I´m using RFCs to obtain data from R3 and i send the language in input parameters and R3 return me descriptions in the language passed.
My application has sap authentication, and i have the language from logged user.
But the problem is when the logged user has not a language predifined, then Translate 1 is in the first language in the preference of the browser (p.e. 'es'). i need this language to send it to R3 but i can not obtain it, i only can obtain the default Locale but i can not obtain the first language in the preferences of the browser.
i have used Locale class from Java, but it doesn´t help me.
Any idea?
Thank you

Hi everybody,
thank you for your answers.
Definitely i have tested with Poojith's code:
java.util.Locale sessionLocale = WDClientUser().getCurrentUser().getLocale();
and with Manoj code:
WDResourceHandler.getCurrentSessionLocale().getLanguage();
and both solved the problem. They return me the first language of the preferred list of the
browser, but i have a question:
-In this moment the user has not a language predefined in sap(UME) and i have not permissions to change it, if a user has predefined language, do these codes return me the sap language or browser preferred language?
Thank you for all
Edited by: Fernando Acevedo on Oct 4, 2010 9:56 AM

Similar Messages

  • How obtain Index a multi-language Portal in Google?

    Hello, we are deployment a multi-language Portal.
    How obtain Index a multi-language Portal in Google?
    In Portal, the URL is the same for all language, allways /portal/page/portal/..... and google only dicoverer 1 language.
    How obtain that google discoverer multilanguage?
    We are using Portal 10.1.4.0.1
    Thank.

    Hi
    Some useful threads
    How can i create a multilingual website?
    Multi Language Issues!!
    how to set up a multilingual website with Adobe Muse and push it live to Adobe Business Catalyst
    Do let me know if you have any question.

  • How obtain the serial generated by a Entity CMP+Informix+Sun Appserver 8.2

    I am using a data base of informix, my doubt is as I can obtain the serial generated by a Entity CMP deployed in Sun Appserver 8.2 , after of insert to informix data base ? .
    thanks for your help.

    Help me!!!
    Thanks.
    Smile

  • How to change the spelling correction language in Mail

    Hey!
    Often I have to write emails in different languages and I'm looking for a solution to change the spelling language by a click. My plan was to record the procedure of changing the language and then to add for every language one button to the mail tool bar. First I tried to record an AppleScript in Mail. Didn't work at all (actually the only app I found which records scripts is Finder). Then I recorded a similar task in Finder which works fine and tried to adopt it to Mail. It didn't work out. Has someone an idea how I can solve that problem.
    My simple training script what I tried to adopt for Mail (i just tried to change something in the Mail preferences, not the language):
    tell application "Finder" <--- replaced all "Finder" with "Mail"
    activate
    select Finder window 1
    open window of Finder preferences
    set folders open in new windows of Finder preferences to true
    close window of Finder preferences
    end tell
    Thanks
    Bastian

    Hi
    It's not that easy! Apart from the fact that Mail doesn't work the same way as Finder, it also doesn't have its own spell checker: it uses the system-wide AppleSpell service.
    The pane you see when you manually change the preferred spelling language in Mail (or TextEdit, or Safari) doesn't belong to Mail at all, and isn't directly accessible by AppleScript because AppleSpell is an invisible and unscriptable process.
    See this closed Apple Discussions thread for a brief indication of how you can change the preferred language using a shell script.
    And see this macoshints thread for an indication of the complexity of the issue.
    You need to know the "code" for each language used in the preferences file: "en_GB" for British English, "fr" for French etc etc. You would then need to wrap each shell script in an AppleScript "do shell script" command like this:
    do shell script "defaults write 'Apple Global Domain' 'NSPreferredSpellServerLanguage' \"fr\""
    to change the language to French.
    Unfortunately, I think you would also need to quit Mail and relaunch it before the change will take effect.
    HTH
    H

  • How to determine browser language settings?

    Hi,
    i want to create a flash chart diagram in APEX 4.0 with dynamic column names (series name={here the dynamic column header}) depending from the browser language setting. How can i determine the browser language setting in the flash charts sql?
    Or is there any other way how i can create dynamic column header for this purpose?
    Regards
    Stephan
    Edited by: Stephan Diedershagen on 03.11.2010 14:35

    Hello,
    Just wanted to remind you that APEX has a substitution string called BROWSER_LANGUAGE that holds the current browser language. No need to define extra application item and computation.
    http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/concept.htm#sthref218
    Also, if working with multi-lingual is a major motive in your application, you should learn how to use the APEX translation mechanism. It will save you the need to define your own language mapping tables and a lot of ‘CASE’ statements. It can be a real time saver. You can start here:
    http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/global.htm#sthref2278
    Regards,
    Arie.
    &diams; Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
    &diams; Author of Oracle Application Express 3.2 – The Essentials and More

  • How to obtain the updated column name in a trigger?

    Hello everyone,
    I need to know for audit propose the updated column name in a After Update Trigger on a Table.
    The table have more than 20 columns, and i think that do more than 20 conditions asking for the difference between the :new value and the :old value is not the best way.
    Thanks for the help!
    LCJ

    Hi,
    Thanks to all for the replays.
    I didn't know that i can pass the column name to the UPDATING. This is only possible on 10g??
    Any way, i pass the column name and works fine, but i have another issue because of that.
    I obtain the column name from a cursor that query user_tab_columns view, when i try to obtain the value of the :old or :new, i can't because i don't know how to obtain the value of the value.
    This example show better:
    DECLARE
    vOldValue Varchar2(50);
    Cursor cur_Column_Names Is
    Select COLUMN_NAME
    From User_Tab_Columns
    Where TABLE_NAME = 'table_name';
    BEGIN
    For var_cursor In cur_Column_Names Loop
    If Updating(var_cursor.COLUMN_NAME) Then
    vOldValue := '?'; -- How obtain the value of the :old. + >var_cursor.COLUMN_NAME??
    End If;
    End Loop;
    END;Thanks to all for the help.
    LCJ

  • Atomic Web Browser -- How to set as preferred browser instead of Safari?

    I recently installed the Atomic Web Browser on my iPad.  However, whenever I tap on a link outside this app (in an email, for example), the Safari browser is activated.  Is there a way to make the Atomic Browser the preferred browser so this won't happen?
    Thanks in advance!

    Not at the moment no, there is no way to change it from Safari. You can try leaving feedback and maybe it'll happen in a future release : http://www.apple.com/feedback/ipad.html

  • How to get user browser locale from view object

    Hello,
    Currently, I have a view object that's used to retrieve localized messages from data base. The resource table looks like the following:
    MSG_ID VARCHAR2,  --> specify the L10N resource reference
    LOCALE VARCHAR2, --> used to specify the user locale (browser locale)
    MESSAGE VARCHAR2  --> real message
    I'm creating a bind variable (let's say it 'RequestLocale') in this view object to specify the locale and to get the expected L10N message. Currently, the value for this bind is set as an Expression with value of 'viewObject.DBTransaction.session.locale.toString()'.
    After defining the view object (and the bind variable like above), I created a table by dragging the view object to a jsf page, and run and open the page in a web browser. It seems that the messages (specified by the locale) could be retrieved correctly. But once I change the web browser language settings to another preferred language, and refresh the page, I found that the message is still for the previous locale, and not refreshed to the locale (language/country) that's newly set in web browser.
    Am I supposed to do more thing to get the 'locale' work by using the adf view object bind variable?
    Thanks.

    Hi,
    after changing the locale, can you try a re-direct of the page to see if this changes the locale. In ADF, the locale is set by the HTTP request handler in the ADF lifecycle ensuring that the locale is passed to the middle tier. So the expected change is to come from the view layer (which is why I think you need a redirect). Another option to check is to access the HttpRequestObject from the FacesContext --> External Application to check the request locale
    Frank

  • Make firefox handle URLs from other applications, when not the default browser

    I know there is a preference for this SOME WHERE because I saw it. Now I want to change it.
    I want to toggle whether clicking on a URL in some other app (like my email) will be handled by the Macintosh Default Browser (Safari) or by Firefox

    Only the default browser can handle links automatically.<br />
    That is handled by the OS and can't be affected otherwise.
    If you do not want to change to default browser to Firefox then you need to drag the link in a Firefox window or otherwise open the link in the preferred browser.

  • How do I change the browser language in Firefox 4?

    I upgraded to the beta version of Firefox 4.0, and my browser language automatically changed from English to German. How do I switch it back?
    It seems that the option to change the browser language under ''Options'' > ''Advanced'' > went away with Firefox 4.0.; at least I don't see it anymore.
    Firefox allows you to select your prefered language to view a website under ''Options'' > ''Content'', but this has no effect on the browser language.
    Please advise.

    I had the same problem!
    for me, the best solution is the following:
    '''1) go to '''
    http://kb.mozillazine.org/Language_packs
    here you find an actual link to the''' language packs in any language''', for firefox 4.
    They are in fact files called "xpi" (add-ons for firefox), to be found at http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest/win32/xpi/
    (but this could change at a later point in time...).
    '''2) click on the laguage pack you like''' (in the file list as above described), it will be installed immediately by firefox.
    '''3) type about:config in your browser address bar''', and go to "'''general.useragent.locale'''" (you can type this in the "filter" bar that you see there).
    Edit the value to the language shortcode you just downloaded, if this isn't done yet (eg: "en-GB" for british english, instead of "de-DE" for german!)
    * Take care when editing the about:config file! This could damage your firefox installation.
    * This solution takes just five minutes instead of 20-60 to download and reinstall Firefox in another language from scratch. Also, in case you have already other settings done, this could extend to several hours...

  • How do I install a language XPI globally and make it the default language?

    I am using Firefox on unices and various Linux distributions (the less common ones). Installing Firefox is easy, but it is always in English. I get most of my interfaces (gnome, libreoffice, gimp, etc) in my preferred translation simply by setting the proper locale (export LANG=xy_XY.UTF-8) before starting Xorg. I found and downloaded my preferred language pack for firefox, which comes in an XPI archive. Opening that XPI file in Firefox (via an URL of file:///path/to/file/langpack.xpi) works smoothly, the translation gets installed under the user's own profile and it shows up in the add-ons (under the new category: Languages). Unfortunately, I still see no way in Firefox preferences to set this added translation as the default. Firefox still starts with the English interface. On SeaMonkey, there is a combobox on the Appearance panel that allows me to select the language of the interface from the list of installed/available languages. I cannot find such option on the panels of Firefox. So far, I had to install a language-changer add-on to be able to set the interface to my native locale. Even though my users never need to switch to any other locales.
    Q1., Once a language xpi is installed, how do I set the interface to use that language?
    Q2., How do I install the language xpi and make it the system-wide default, so that all my users see Firefox starting with the native (non-English) interface?
    I found a handful of description for Q2, but they appear to be outdated and do not work. These include the -install-global-extension argument to Firefox, placing the xpi file as it was downloaded into the "extensions" folder, placing the xpi file renamed to the extension ID into the "extensions" folder, unzipping the contents of the xpi into a subfolder of the "extensions" folder named as the extension ID. Please note, these attempts might have failed because I placed the extension NOT where it was supposed to go. The instructions refer to the global extension folder as <installation folder>/extensions, but on my system no such folder exists. Firefox seems to get installed into /usr/local/lib/firefox and there is no "extensions" subfolder there in. However, there is a "browser/extensions" subfolder, but placing my XPI there did not trigger any effect. Also, I manually created the "extensions" subfolder in /usr/local/lib/firefox and moved the xpi there (on various names, unzipped and in a whole) without the expected result.
    Any suggestion is very much appreciated!
    My goal is to install the firefox package, then run something from the command line resulting the non-English translation in the downloaded XPI becoming the system-wide default for all users. A step forward would be to know for certain where that "extensions" folder must be on my specific OS. How do I query that?

    Excellent. These guides got me as far as installing my preferred language pack, which gets added to the add-ons automatically (assuming the user says yes to the appearing question when Firefox is started).
    However, the GUI does not change unless the user enters "about:config" and changes the locale.
    Is there a way to do this from the command line? I mean, changing the locale settings.
    And preferrably for all users. So even when new users get added and they start Firefox the first time, they see it appearing with the preferred locale and not in English.

  • How to clear the cache in the portal browser

    Hello Experts,
    Iam unable to clear the cache in the portal. I tried  clearing the Navigation cache , PRT cache,PCD cache,Database cache,UME cache.
    The senario is in the browser if iam logging with some user X , he should see only 1,2,3 countries, and if i logg off and again logg in the same browser with different user he is seeing same 1,2,3 countries unlike he should see 4,5 countries.
    But if iam opening in different browser iam getting the correct one with cache cleared.
    I want to acheive this in the same browser.
    Qucik help in solving out this cache problem is appreciable.
    Regrds,
    Manasa.

    There is one more important cache: the HTTP Provider Service cache (in VA).
    To find out why the browser is showing the same languages, analyze what the server is sending to the browser with HTTPWatch or Firebug and look at the cache flag. Also check what is the iView cache parameter? Is it user, session, shared or none?
    How do you do the logoff? The best thing is to make sure that the HTTP Session is killed. If not, the portal may send data that is cached for the HTTP Session to the browser. When you open a new browser, you will also open a new HTTP Session. That could be the cause why it is working with a new browser instance.
    br,
    Tobias

  • Preferred display language in safari without modifying the system language?

    Hi
    I have my system language set to US English.
    I want to change only safari preferred language to another language without having to change the default OS language.
    In firefox it's easy to have firefox in english but the default language for site specific languages another language.
    any idea how to do this in safari 4.x for osx?
    Cheers

    I don't think there is no way to do what you want.
    http://www.w3.org/International/questions/qa-lang-priorities
    Ask Apple for fix it here:
    http://www.apple.com/feedback/macosx.html

  • How to close the web browser

    How can I be sure the web browser and all screens are completely closed on the droid 2

    Why is closing the browser important? Are you concerned about battery life?
    To close any app that is running you can go to Settings > Applications > Manage Applications > Running and force stop on the browser.
    It is certainly harder than on PC or MAC platforms, and even on some other smartphones.  At the same time, in many smartphones including Windows Mobile, iPhone, BB and others, the general model is different than computers - the general approach is that well behaved applications in essence are meant to be demanding no CPU when they are not in focus, unless there's some explicit background function like periodically obtaining e-mail and such.
    Certainly this may not always be the case, especially if an app is not coded correctly - but generally the guidelines for developers of smartphone code across multiple platforms discourages having an exit button and instead focuses on how to make sure an app is well behaved and low in demand during expected prolonged periods of dormancy.

  • A very simple question: how to obtain the mail server name?

    In our JSP application, at one point an email will be sent to notify one event. Currently, that is done by using the html tag: mailto. To have more control on the email in tems of context format (a bad layout right now) and others. I would like to have it processed at servlet by using the JavaMail API, so that it have a nice format and have the sender's email address right in case email client is not installed in the machine where the browser in. The JavaMail API is straight forward. The question is how to obtain the mail server name, and the sender's email address if there is one?
    Thanks.
    v.

    How to obtain the mail server's name? It's your server, you should know its name. Or if it isn't your server, you should ask the administrator for its name. Point is, you need to decide in advance what server you are going to use and hard-code its name into the program or into a properties file.
    And how to obtain the client's e-mail address? You have to ask the client, probably by putting a box in the HTML and asking them to type it.

Maybe you are looking for

  • Adobe air not working

    hi i use various software that need adobe air to use. but for whatever reason it is just not working. i have uninstalled adobe air and re-installed it but that didn't work i have uninstalled adobe air and one of the software i use with it and re-inst

  • Share iTunes music folder - Vista SP2 - iTunes 8.2.0.23

    I have one new computer. There are 5 users that all need to be able to access all exactly the same music. I've followed the instructions on page: http://support.apple.com/kb/HT1203 but it doesn't work. Specifically, Windows Step 2 is not right for Vi

  • How do I control the Quicktime Export settings for a project

    I want to make a printed photo album in iPhoto for my parents Diamond Wedding Anniversary and so have set up a project with the appropriate template. I now want to create a preview quicktime movie of the book so far in order to send it to my brother

  • Playing Videos on TV

    Hi, I want to see if someone know the formats that I need to convert the videos that I have to play them later on a TV screen. May be the frames per second, may be 640*480 I don´t know, because I have tried but it start playing but it disconect him s

  • I cannot locate the TDK For Life on Record FM Radio   Alarm Clock app?

    I cannot locate the App for TDK For Life on Record FM Radio   Alarm Clock app? It is not available in the Irish Apple stope nor the USA Apple store.