How can i change my locale programatically?

Hi
here it goes....The first page of the application shows 3 radio buttons w.r.t different languages eg, hindi, english, tamil. My web application is running fine and the appropriate property file is picked using resource bundles.The challenge is something like this -> Now when the user selects a particular radio button the locale should change automatically and the keyboard should start typing in characters in that particular language.The user sud not have to change the locale manually....i.e on the right side in the task bar, for different languages. How do i do this programatically?
Front end : JSP
Back end : DB2
Plz help
cheers
caffaine

Hi Caffaine,
sounds like a difficult problem... I tried to do something similar to this a few years ago under Java 1.3, and I can tell you that you'll have a couple of problems.
1) ResourceBundles are a type of cache, so the one you load first is the one you are stuck with for the remainder of the program execution. The only ways around that AFAIK is to either author your own non-static ResourceBundle, or to have the user re-execute the client every time they want to change locales (neither of which is particularly appealing). Not sure if anything in Tiger has rectified this, but I don't think it has.
This also means that your server will be stuck in a certain locale. Probably the best thing to do would be to write your clients so that all information heading back to the server heads there in Unicode, so that you're dealing with a common encoding on the server side. This means no bytes or chars. Strings would be the thing to use.
2) AFAIK, Java has no way of programatically changing the Windows input locale. Though if I am wrong, someone please correct me!
Hope that helps!
Martin Hughes

Similar Messages

  • DMP-4400G How can I change the local time

    Hi,
    Recently I installed DMS 5.0.2 and DMP-4400G for Digital Signage. Now I am running a Flash application that is embedded into a HTML page, but sometimes the DMP does not show the content of the flash, the LCD shows a temporary error; this error never occurs when I use a standard PC with any Internet browser to display the same content. The webmaster says that DMP does not have an updated time and date. Do you know how to change the local time and date of the DMP-4400G.
    Thanks for your help.

    Jhon,
    There are couple of things...
    1. The DMP 4400G has a internal clock but at this time there is no way to change the date & time on the DMP 4400G.
    What does the date & time have to do with the Flash Content anyway?
    2. What version & type of Flash is being used for this embedded Flash content? Is the correct version selected & configured on the DMP?
    Cheers!
    T.

  • How can I change hour local language to AM or PM only?

    I set Locale to th_TH and I use SimpleDataFormat class like this 'yyyymmdd hh a' then field 'a' return local language but I want to return AM or PM only.
    I know that it can set new value in i18n.jar (LocalElement_th.class) but I don't want to recompile i18n.jar.How can I solve it.?
    thank you

    Hi,
    I never used this class but try to set a different locale for the object of this class (eg. in the constructor). Or does this affect the time, too?
    Or use a specific DateFormatSymbols object!?
    Greets
    Puce

  • How can I change a local format (bol, italics) to character style

    Hi, I'm new in scripting. I need to change local formats to character styles in some documents, but I can't find the proper ID Object Model to do it in Java. Can somebody help me?

    Thanks for the help! It worked! But I have two problems now:
    1. The documents use Helvetica fonts (light, lightitalic, semibold, etc.) on headings, and the script doesn't recognize nor replace them as character styles. I guess I should replace those fonts with a compatible one (Times New Roman, perhaps). Is there any script that may do that?
    2. Some paragraph styles use bold by default, but the script generates a character style in that cases too. The perfectpreptex you send me attend to fix this problem, but the styles document crashes!!

  • How can I change then locale of the sample search application?

    I have successfully installed Ultra Search.
    But the sample search page(http://localhost:7777/ultrasearch/query/usearch.jsp)
    is in English. And the query result wasn't correct when I input a Chinses word.
    I founed usearch.jsp was hard-coded to Locale.USBI must Change it into Simplified Chinese. What should I do?
    Thanx.

    in usearch.jsp, q_locale and q_docLocale are different.
    q_locale is the language of the query string typed by the user.
    q_docLocale is the language of the documents being searched.
    So if your q_locale is Locale.CHINA, but q_docLocale is Locale.ENGLISH,
    you might not find anything.
    When it is not clear, you can pass null for q_docLocale, then all documents
    will be searched.

  • How can I change the ipad2 backup location

    How can I change the local computer backup location for an iPad2 (iOS 5.0.1) to a folder I designate so it doesn't go through a specific user account (i.e.- If I create a folder directly on c: then point the backup there)?

    This previous discussion may be of interest: how do i change the file location of a backup on my computer

  • How can we change local administrator password in 500 machines in a domain from a centralized location?

    How can we change local administrator password in 500 machines in a domain from a centralized location?

    This was moved out of the Profile forum.
    You should ask this question at
    www.answers.microsoft.com.
    Or I can move it into another forum if you'd like.
    Thanks!
    Ed Price a.k.a User Ed, Microsoft Experience Program Manager (Blog,
    Twitter,
    Wiki)

  • How can I change name and password of my local network

    I have just changed to the new AirPort Time Capsule. In setting up teh network and have unsed new names and now some of the HW is not working correct. How can I change name and change the passwords

    Use Airport Utility and change them in the same way you set them up in the first place.

  • Got the old MacBook Pro from my daughter; I have an Apple ID; How can I change the user of the Pro to my name

    My daughter gave me her old MacBook Pro; How can I change the computer name and users account to mine; I have alraedy an Apple ID

    Here are the steps to follow when giving away or selling a Mac.
    http://support.apple.com/kb/HT5189?viewlocale=en_US&locale=en_US

  • How can i change the apple id on my iphone for icloud?

    the iCloud for my new iphone wants to use my old email address and password but i dont remember it. how can i change that.... help!!!!!

    @fernandamagalhaes
    It looks like the article below has the information you are looking for.
    iCloud: Change iCloud feature settings
    http://support.apple.com/kb/PH2613
    Turn off iCloud completely
    Depending on whether you want to stop using iCloud on all or only some devices, do one or more of the following:
    On your iOS device’s Home screen, go to Settings > iCloud, then at the bottom of the screen, tap Delete Account.
    Note:   If you delete your iCloud account, iCloud will no longer back up your iOS data. You can still back up your device in iTunes (for more information, open iTunes and choose iTunes > Help). 
    On your Mac, open iCloud preferences, then click Sign Out.
    If your Mac has OS X v10.7.5 and you turn off iCloud, your calendar information and reminders aren’t stored locally in iCal. If you want to retain your calendar and reminder information, you need to back it up before turning off iCloud. For more information, see the Apple Support article iCloud: Calendar & reminder data removed from Calendar and Reminders or iCal when disabling iCloud Calendar.
    On your Windows computer, open the iCloud Control Panel, then click Sign Out.
    Note:   If you turned on automatic download of music, app, or book purchases (in iTunes preferences or in Settings on your iOS device), your iTunes purchases are still downloaded to your devices.
    Set up iCloud on your devices

  • How can i change my macbook pro keyboard buttom english to arabic

    How can i change my macbook pro keyboard buttom english to arabic

    Apple does make and sell MacBook Pros with Arabic keyboards but, as far as I know, they're only sold in the Arabic market. You may be able to special order one: I don't know. You may even be able to order the keyboard only online or at your local Apple Store and have your English keyboard replaced. Again, I don't know.
    The best thing to do, if you're in the US, is to call Apple at 1-800-MYAPPLE. Tell them what you need and see how they might go about fulfilling your needs.
    Good luck,
    Clinton

  • I want to switch my user id with my rescue email address, how can i change my rescue email address to something else to free that up?

    i want to switch my user id with my rescue email address, how can i change my rescue email address to something else to free that up?

    Hi EllaBella0902,
    Welcome to the Support Communities!
    The information below may be able to answer your questions about how to change your rescue email address:
    Manage your Apple ID primary, rescue, alternate, and notification email addresses
    http://support.apple.com/kb/HT5620?viewlocale=en_US
    Before you make any changes, you may want to review the information in the Frequently Asked Questions section of this article:
    Using your Apple ID for Apple services
    http://support.apple.com/kb/HT4895
    This article explains how to update the information in the various services that use the Apple ID if you change it:
    Apple ID: What to do after you change your Apple ID
    http://support.apple.com/kb/HT5796?viewlocale=en_US&locale=en_US
    Cheers,
    - Judy

  • How can i change a pop mail a/c into an imap a/c on my ipad2 without deleting the pop a/c and losing everything?

    how can i change a pop mail a/c into an imap a/c on my ipad2 without deleting the pop a/c and losing everything?

    Ernie Stamper wrote:
    If the Inbox for this account only is revealed, is there any triangle beside it?
    Ah, yes, I see! Silly me to be looking for Sent mail under "Sent"! Indeed, there's a disclosure triangle next to the account name under "Inbox", and wen you open it, it shows Drafts, Sent, spam, and Trash. The sent items are indeed there.
    Mind you, my Dot Mac accounts show up normally, i.e., their sent mail goes under "Sent". Wish all IMAP accounts did that. It sure isn't logical to show sent mail inside an inbox...
    But to answer your question: In addition to having the "Sent" folder for the account under "Inbox", I also have a folder for the account under "Sent". This folder disappears when I check the box to store messages on the server. There were emails in it (the ones I placed there myself). I have now moved those emails to the sent sub-folder under the account under "Inbox". Even with the "store on server" option UNchecked, the emails were instantly duplicated to the server, so that they were present both locally and remotely. I then checked the "store on server box"; this made the mailbox for the account under "Sent" vanish.
    To summarize: things appear to work normally now, except that I find it very inconvenient to have to look in two separate "Sent" folders to find emails I've written.
    Daniel

  • How can I change a State name in iphoto map?

    A few months ago, changing a location of a group of photos, I really changed a state name.
    The image shows the name State "Casa David i Mireia" where should say "Catalunya" that is the real name.
    How can I change that name. I have opened a case in Apple Support, but the solution to reinstal the app have not worked for me.
    Thank you for your help
    Jordi

    Thanks for your help!
    The problem is that I think that I changed the "default" name for the state where the photos were taken. I have 50 differents locations, that are all correct, and photo per photo, I can modify the original location, but only at "local" level.
    How can I change the name displayed in State section as "Casa David i Mireia" for "Catalunya" that is the real name for the State where the photos where taken?
    I don't if this post is comprehensive. I'm not sure.
    Thanks for your time!
    Jordi

  • How can i change a xmltype column's xml schema?

    i create a table that have a xmltype column.this column is schema-based.
    my problem is ,
    now i want to this column's schema will be redefined to a global schema?
    [b]how can i change the column's schema which already have a schema?

    When a schema is registered a lot of additonal annotations are added to the XML schema by the schema registration process - Look at the version of the XML schema under /sys/schemas/... in the XML DB repository. This information is unqiue to that version of the XML schema and is used internally to manage instance level metadata.
    When instance documents are stored in the DB a set of metadata is generated for each document so that we can make sure that we can maintain DOM Fidelity. This metadata is tied directly to the XML schema the document is associated and is only valid in the context of that XML Schema.
    So when the schema is registered locally and instances are stored the generated metadata is only valid in the context of the local schema. If the same schema is now registered globally new values will be generated for the annotations applied to the global version of the XML schema. Consequently the metadata associated with a document belonging to the local version of the XML schema has no meaning when viewed in the context of the global version of the XML schema.
    The net effect of this is that you will need to copy the data in order to get documents where the metadata for each document is based on the global version of the XML SChema.

Maybe you are looking for