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

    Question Change language in java

    Hi,

    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
    Location
    Washington, DC
    Posts
    3,874
    Rep Power
    8

    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 - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,305
    Rep Power
    25

    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
    Location
    Tucson, AZ
    Posts
    1,060
    Rep Power
    6

    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, 08:24 AM
  2. Is java a top language to learn?
    By insanepenguin in forum New To Java
    Replies: 26
    Last Post: 01-24-2010, 10:16 PM
  3. Java is an OOP language.
    By mysourha in forum New To Java
    Replies: 3
    Last Post: 01-14-2010, 10:15 AM
  4. Replies: 5
    Last Post: 08-25-2009, 09:41 AM
  5. Is JAVA the right language?
    By EDENO in forum New To Java
    Replies: 3
    Last Post: 08-08-2008, 12: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
  •