Results 1 to 4 of 4
  1. #1
    shomid is offline Member
    Join Date
    Aug 2011
    Rep Power

    Question Change language in java


    I created a java Application with serveral jframe and jdialog.
    When running app and language changes to Persian and then opening a jframe or jdialog, app's language changing to English.
    How to fixed Language in all app?

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Washington, DC
    Rep Power

    Default Re: Change language in java

    Are you asking how to implement different languages in your program?

    You'll have to keep track of what should be displayed in each component for each language, then switch what's being displayed when the language changes. There's no magic "change language" function.
    How to Ask Questions the Smart Way
    Static Void Games - GameDev tutorials, free Java and JavaScript hosting!
    Static Void Games forum - Come say hello!

  3. #3
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Eastern Florida
    Rep Power

    Default Re: Change language in java

    Look at the ResourceBundle class.
    If you don't understand my response, don't ignore it, ask a question.

  4. #4
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Tucson, AZ
    Rep Power

    Default Re: Change language in java

    It sounds like you're trying to do internationalization, which is often abbreviated i18n. Searching for those terms might find you some helpful info.

    One way of doing it is to replace every literal string in your program with a call to get() on a Map<String, String>. When the program starts, it fills that Map with Strings appropriate to the user's locale. ("Locale" is another key word you might want to search for.)
    Get in the habit of using standard Java naming conventions!

Similar Threads

  1. how to change whole project in another language base on locale?
    By krunalpatel1410 in forum AWT / Swing
    Replies: 3
    Last Post: 09-20-2010, 09:24 AM
  2. Is java a top language to learn?
    By insanepenguin in forum New To Java
    Replies: 26
    Last Post: 01-24-2010, 11:16 PM
  3. Java is an OOP language.
    By mysourha in forum New To Java
    Replies: 3
    Last Post: 01-14-2010, 11:15 AM
  4. Replies: 5
    Last Post: 08-25-2009, 10:41 AM
  5. Is JAVA the right language?
    By EDENO in forum New To Java
    Replies: 3
    Last Post: 08-08-2008, 01:29 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts