Setting a  Language/Locale to PortletlRenderRequest

Hi,
I would like to set the language/Locale of the PortletRenderRequest depending on the user input.
e.g. if user enters "fr",then the language/locale of PortletRenderRequest should be modified so that resource bundle specific to that locale is picked and data displayed.
Pls let me know,how can I achieve this?
Regards
Yash

Thanks Tugdual,
I have a portlet that display some text and I have some resource bundles for displaying the text in different languages. I ave followed the instructions in the following doc
http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/ARTICLES/HOW.TO.BUILD.A.MULTI.LANGUAGE.JAVA.PORTLET.USING.PDK.JAVA.V2.HTML
Now i would like to test the same by specifying different languages.
If I were to write a method to get the locale from the user and display the content accordingly,how would i do it??
pls let me know where can I get the setLanguage portlet mentioned in the doc whose URL is specified above.
Regards
Yash

Similar Messages

  • Can I set the default locale for jvm

    Hi,
    Can I set the default locale for jvm?
    How to do it?
    Pan

    My windows default locale is chinese .I have thought of your opinion. But in
    windows nt , if I change the locale , all the environment will be
    destroyed(just like reinstall it , it's difficult for me) . So , Is there
    any other approach?
    Dimitri Rakitine <[email protected]> wrote in message
    news:[email protected]...
    Did you try to change the locale in the Windows control panel?
    (Control panel -> Regional Options -> Your locale)
    Pan YangBin <[email protected]> wrote:
    I have tried changing this system property and other properties such
    as -Duser.language=en -Dfile.encoding=Cp1252 , but all these properties
    did
    not changed, you can get this infomation from the log file .Maybe these
    system properties are readonly.
    Thanks very much.
    Pan
    Chris Halstead <[email protected]> wrote in message
    news:[email protected]...
    Try adding -Duser.region=US to the java command line used to start
    WebLogic...
    -chris
    "Pan YangBin" <[email protected]> wrote in message
    news:[email protected]...
    Hi,
    The problem exists in my project still exist.That is it.
    When I did not set weblogic.jsp.encoding to GB2312 in my web
    application(web.xml), and when the jsp file contain's chinese , the
    output
    will be error(error chinese) .And when I did not set it , the output
    is
    correct, but when I use request.getParameter("SomeFormElement")(theelement
    inputed chinese), the return value is error(still chinese error).And
    when
    I
    am in windows nt english version and do not set this property, all
    these
    two
    problems dispear. And I try to compare the java files those were
    generated
    by weblogic from the jsp file , there is only two additional clause
    in
    the
    java file. That's it:
    ((weblogic.servlet.jsp.JspWriterImpl)out).setEncoding("GB2312");
    response.setHeader("Content-Type", "text/html; charset=GB2312");
    (the web.xml has <context-param>
    <param-name>weblogic.jsp.encoding</param-name>
    <param-value>GB2312</param-value>
    </context-param> to be set
    So, I think maybe it works well if I change the default locale toenglish.
    And unfortunately, your method is also failed.(I have to use weblogic
    in
    chinese environment)
    Would you please help me to solve this problem?
    Pan
    Dimitri Rakitine <[email protected]> wrote in message
    news:[email protected]...
    Try java ... -Duser.language=en ...
    or mode con cp select=437 in the command prompt before running
    weblogic.
    Pan YangBin <[email protected]> wrote:
    I'm using weblogic server 5.1 sp6 in chinese environment, and I
    want
    weblogic compile my jsp with en_us locale . So I can't use
    Locale.setDefault(new Locale(...)) to set the default locale ,butI
    really
    want someway configure.
    Pan
    Dimitri Rakitine <[email protected]> wrote in message
    news:[email protected]...
    Locale.setDefault(new Locale(...)) ?
    Pan YangBin <[email protected]> wrote:
    Hi,
    Can I set the default locale for jvm?
    How to do it?
    PanDimitri
    Dimitri
    Dimitri

  • 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

  • Set user preference Locale

    Dear all,
    I would like to set user preferences locale through a Java program.
    It seems that language locale is not part of the desktopsettings and I've not been able to find out what key to use with getProfileString (if any).
    Could you provide me an example of how to set the user preferences locale language? 
    Best regards,
    Francesco

    You can use "SI_LOCALE" as an argument to getProfileString() to retrieve a user's locale.

  • How do I set up a local testing server?

    Hey again everyone. I am trying to figure out how to set up a local testing server. I've read a couple different tutorials online and i still can't figure it out. I added a new server, named it test server, I'm connecting using local/network, my server folder is C:\Users\Jake\Website\testfolder, and my web URL is http://localhost/. My server model is PHP/MySQL.
    My site's root folder is C:\Users\Jake\Website\. I have also downloaded XXAMP. It downloaded and that was it though, I'm not sure if I need to apply it somehow to Dreamweaver. When I try to preview my pages I get a message that asks me if I want to update copy on testing server. If I choose yes, another message comes up and asks me if I want to put dependent files. Whether I choose yes or no it just says IE cannot display the web page.
    Any help would be appreciated, thanks!

    Site Name: PHP Test Site
    Local Site Folder: C:\xampp\htdocs\php_test\
    Server Name: Local Testing
    Connect Using: Local/Network
    Server Folder: C:\xampp\htdocs\php_test
    Default Images Folder: C:\xampp\htdocs\php_test\Images\
    Web URL: http://localhost/php_test/Server Model: PHP MySQL
    Is that everything you need to know? Note that I do not have a remote testing site set up yet.

  • How to set up a local testing server with local-only access

    Hi folks,
    I've reached the point where I need to do some simple server-side scripting in my Dreamweaver work. I work remotely pretty often, so I want to be able to preview my work without having to go back and forth to the production server. It seems to me the solution would be to install a little web server on my laptop, BUT I'm concerned about security. Is there any way I can set up a local webhost but not make it accessible to the outside world?
    I'm really pretty clueless about this stuff, so I'd appreciate any advice. Thanks!
    -Kim

    I would recommend using XAMPP Lite.  It's very lightweight and portable when installed on a USB drive or flash stick. 
    http://www.howtogeek.com/howto/14998/
    Nancy O.

  • I am English but live in Spain, When I got my new Macbook Pro I set the language to English, so far so good. Then I stupidly set the keyboard to British when it is obviously a Spanish keyboard. How can I reset it to Spanish. Sorry cant find question mark

    I am English but live in Spain, When I got my new Macbook Pro I set the language to English, so far so good. Then I stupidly set the keyboard to British when it is obviously a Spanish keyboard. How can I reset it to Spanish. Sorry cant find question mark

    LizMaddock,
    you can reset the input source to Spanish by selecting the Keyboard pane of System Preferences, selecting the Input Sources tab, and pressing the “+” button in the lower-left corner to select one of the Spanish input sources. The “Spanish – ISO” input source is most similar to the physical Spanish keyboard layout.

  • How can I set the language when sending an e-mail with attachment - 'Html'?

    "Character Broken"
    I made an ALV program, and this convert to "HTML',  and send an e-mail with this.
    Used Process is:
    DATA: gt_abaplist LIKE TABLE OF abaplist,
          gt_html LIKE TABLE OF w3html,
          doc_chng LIKE sodocchgi1,
          objpack LIKE TABLE OF sopcklsti1 WITH HEADER LINE,
          objhead LIKE TABLE OF solisti1 WITH HEADER LINE,
          mail LIKE TABLE OF solisti1 WITH HEADER LINE,
          reclist LIKE TABLE OF somlreci1 WITH HEADER LINE,
          lv_line TYPE i.
    DELETE FROM MEMORY ID '%_LIST'.
    SUBMIT z_template
       AND RETURN EXPORTING LIST TO MEMORY.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        listobject = gt_abaplist
      EXCEPTIONS
        not_found  = 1
        OTHERS     = 2.
    CALL FUNCTION 'WWW_HTML_FROM_LISTOBJECT'
      TABLES
        html       = gt_html
        listobject = gt_abaplist.
    doc_chng-obj_name   = 'URGENT'.
    doc_chng-sensitivty = 'O'.
    doc_chng-obj_descr  = ' '.
    doc_chng-obj_langu  = '3'.
    objhead-line        = ' '.
    APPEND objhead.
    mail[] = gt_html[].
    DESCRIBE TABLE mail LINES lv_line.
    CLEAR: objpack.
    objpack-transf_bin = 'X'.
    objpack-head_start = 1.
    objpack-head_num   = 0.
    objpack-body_start = 1.
    objpack-body_num   = lv_line.
    objpack-doc_type   = 'htm'.
    objpack-obj_descr  = ' '. 
    objpack-doc_size   = lv_line * 255.
    objpack-obj_langu = '3'.
    APPEND objpack.
    CLEAR: reclist.
    reclist-receiver = 'e-mail address'.
    reclist-rec_type = 'U'.
    APPEND reclist.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
      EXPORTING
        document_data              = doc_chng 
        put_in_outbox              = 'X'
        commit_work                = 'X'
      TABLES
        packing_list               = objpack
        object_header              = objhead
        contents_bin               = mail
        receivers                  = reclist
      EXCEPTIONS
        too_many_receivers         = 1
        document_not_sent          = 2
        document_type_not_exist    = 3
        operation_no_authorization = 4
        parameter_error            = 5
        x_error                    = 6
        enqueue_error              = 7
        OTHERS                     = 8.
    SUBMIT rsconn01 AND RETURN.
    I want to show  this by "Japanese".
    But the character is broken.
    LIke This:
    u01D1u072C          u0205|            u0205u072C          u0508           QC u04B90m
    How can I set the language?  How can I solve "Charancter Broken" ?
    Plesse, let me know.
    Thank you so much.
    Edited by: Jaime White 999 on Nov 21, 2011 8:45 AM
    Edited by: Jaime White 999 on Nov 21, 2011 8:46 AM

    Hi Jaime,
    Are you saying, you are getting junk characters in the email attachment? Then pls check the following. Since you want to send Japanese fonts, please pass language 'J' in both  objpack-obj_langu = '3' & doc_chng-obj_langu  = '3' instead of '3' please replace it with 'J'.
    Another thing which you may have to check is the SCOT device type. As I understand from my basis colleague, this may also affect your attachment fonts since the emails are sent through SCOT. Go to transaction SCOT-> Settings-> Device types for format conversion. Check whether wrong device type is defined for Japanese there. Hope this helps
    Regards,
    Gokul

  • Hi, can someone please tell me why the spell check in pages doesn't work. I went to preferences and enabled this auto spell checker and have set the language to british english. But still it doesn't work while it works perfectly in TextEdit.

    Hi, can someone please tell me why the spell check in pages doesn't work. I went to preferences and enabled this auto spell checker and have set the language to british english. But still it doesn't work while it works perfectly in TextEdit.

    Inspector > Text > More > Language
    Only applies to selected text, like making it a particular font.
    It is not a setting that sticks. If you continue to paste in text from elsewhere particularly the Internet it will have a different or None language set to it. You need to select it and make it B.E.
    Peter

  • I recentley bought a ipod touch set all language to English, billing to English etc. The problem i have is when i open itunes or Apps store on my ipod it is in German, I'm English so don't understand German.. Can anyone help to change language in store

    I recentley bought a ipod touch 5.01,set all language to English.....every thing i view is in English except when i view (open) itunes or apps store it is in German, I live in England, I was born in England, and i speak only English. I want my itunes and apps store to open and display in English. I have messaged the apple help and telephoned the help, both was helpful but no matter what i do in setting (even in reset, which i've done) my ipod will keep reverting back to German in Itunes and Apps store. All other data in my ipod is in English........just the itunes and apps store grrrrrrrrrrrr.
    Please help :-)

    You can only use the German iTunes/App store if you are located in Germany.  The German store is in the German language.

  • ITunes 10.2.1.1 not able to set german language

    I just upgrade to iTunes 10.2.1.1 and now there is no german word. I tried to change the language in settings but it is still det on german.
    It seems a problem in this update!
    Or can somebody say me how to set the language to german?

    Problem solved - did a repair run of iTunes installation.

  • How to set multiple languages to each tab in JTabbedPane?

    Hi!!!
    Am trying to set two different languages to each tab in a tabbedpane. For each language i have maintained one file with unicodes. So, If any key has an empty value in that file, the value for the same key in other language file should be displayed for the tab.so, here the actual probem occured. it was showing some boxes instead of that tab title.Please give me a solution to set different languages (using setFont()) for a tabbedpane.
    Thank you
    Mourya

    Hi!!!
    First of all .. Thanks a lot for ur valuable time and suggestions. Coming to the topic... i have used all these unicodes. Could you please tell me that would it be possible to set multiple languages to a tabbedpane at a time? (in the context of missing of keys setting other language key to that missed one).
    Thanks
    Mourya
    Edited by: sindhumourya on Oct 7, 2008 1:58 AM

  • To use a router to set up a local wifi network. Would this system be suitable to use with an Apple TV or is internet access require

    I'm considering using Apple TV to connect to a projector in a church hall which does not have any internet access. I intend to use a router to set up a local wifi network. Would this system be suitable to use with an Apple TV or is internet access require

    Welcome to the Apple Community.
    Yes, that will be fine providing you don't want to play any protected content.

  • Can I set the language (for spellcheck) of a document in the iCloud Web version, or iOS version, of Pages? If yes, how?

    Can I set the language (for spellcheck) of a document in the iCloud Web version, or iOS (iPad) version, of Pages? If yes, how?

    In iOS, the spellcheck language follows the keyboard.
    The forum for questions about iOS Pages is at
    https://discussions.apple.com/community/app_store/iwork_for_ios

  • How to set password for Local are connection?

    How to set password for Local are connection?

    do you mean the 802.1x authentication?
    check out links below:
    http://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst2950/software/release/12-1_9_ea1/configuration/guide/scg/Sw8021x.html
    http://technet.microsoft.com/en-us/network/bb545365.aspx
    Every second counts..make use of it. Disclaimer: This posting is provided AS IS with no warranties or guarantees and confers no rights.
    IT Stuff Quick Bytes

Maybe you are looking for