×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Regular Contributor
    Join Date
    Jul 2007
    Posts
    50

    How to create multilanguage application?

    Hello friends,

    I'm developing one application in J2ME + NetBeans for S40 2nd Edition.
    I want my application in multilanguage (English + Hindi) when user selects English, all labels & control names should appear in English & same for Hindi.

    Is this possible? How i can do this? If anyone have small demo of it please let me know.

    Thanks

  2. #2
    Registered User
    Join Date
    Dec 2005
    Location
    Brazil
    Posts
    1,884

    Re: How to create multilanguage application?

    Hi iworktech_kiran,

    You can create your own Internationalization (I18N) mechanism or use JSR 238 - Mobile Internationalization API for J2ME in case your target devices support it.

    If creating your custom solution, it is just a matter of having a resource file for each lanaguage and a supporting class that allow you to retrieve the right label using pre-defined keys and the given locale.

    Check the links below for more related stuff.

    Internationalize your MIDlets
    http://www-128.ibm.com/developerwork...ary/wi-midapi/

    Server-Supported Internationalization of Wireless Java Applications
    https://cis.med.ucalgary.ca/http/jav.../i18n/i18n.pdf

    J2ME and Unicode
    http://www.devarticles.com/c/a/Java/J2ME-and-Unicode/

    http://discussion.forum.nokia.com/fo...light=language

    http://discussion.forum.nokia.com/fo...edition.locale

    http://discussion.forum.nokia.com/fo...ad.php?t=72445

    Hope this helps
    Juarez Alvares Barbosa Junior - Brazil

  3. #3
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: How to create multilanguage application?

    JSR-238 is not available on any Nokia handsets as of now, and I guess there is no other phones either to support this API (although I can be mistaken in here...)

    Hence your only valid option is to create the classes need for the multi-language support yourself.

    One solution (if you do not have many strings you need) is to use the JAD attributes, but if you have a lot of strings the JAD file can get too big and the phone will not install your MIDlet anymore. The good point is that if you decide to sign you MIDlet you can change the JAD contents without needing to resign your MIDlet.

    Another solution is to create a textfile for each of the languages which you then store inside the JAR file.
    Etc.

    The bottom line is that you need to do the work here. You cannot rely yet on methods allowing you to do an easy internationalization

    Hartti

  4. #4
    Registered User
    Join Date
    Dec 2005
    Location
    Brazil
    Posts
    1,884

    Re: How to create multilanguage application?

    Hi Hartti,

    There are some few phones from Siemens Mobile (BenQ Mobile) that support JSR-238, both 65 and 75 generation phones (S75, SL75, etc).

    They are still being marketed here in Brazil and Europe as far as I know, although the company is not in its best shape...

    Br,
    Juarez Alvares Barbosa Junior - Brazil

  5. #5
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: How to create multilanguage application?

    Good to know, thanks Juarez!
    And soon (at some point in the future) there are more such phones as JSR-238 is part of MSA specification (JSR-248)...

    Hartti

  6. #6
    Super Contributor
    Join Date
    Jun 2007
    Location
    Mumbai
    Posts
    539

    Re: How to create multilanguage application?

    Well i would suggest that if u r app is stand alone i mean not network based then use unicode to display ur text and according to user selection show him that unicode.. i think this should work fine.

  7. #7
    Registered User
    Join Date
    Aug 2005
    Posts
    44

    Re: How to create multilanguage application?

    hi
    All you have to do is to write the unicode values of the characters and save it into a resource file. At the time of displaying you can pass the unicode values of the characters. If the phone supports the font then it will display the character else it will display the unicode value itself.

    If you need some help on using light weight font system independent of the font model then please contact me here.

    regards
    nimish

  8. #8
    Registered User
    Join Date
    Aug 2005
    Posts
    44

    Re: How to create multilanguage application?

    hi
    All you have to do is to write the unicode values of the characters and save it into a resource file. At the time of displaying you can pass the unicode values of the characters. If the phone supports the font then it will display the character else it will display the unicode value itself.

    If you need some help on using light weight font system independent of the phone model then please contact me here.

    regards
    nimish

  9. #9
    Regular Contributor
    Join Date
    Jul 2007
    Posts
    50

    Re: How to create multilanguage application?

    Thanks guyes,

    I'm trying soln you suggested.......

Similar Threads

  1. hw to create a login page to my application
    By praveena in forum Symbian User Interface
    Replies: 3
    Last Post: 2009-06-19, 14:45
  2. Create simple SMS application with J2ME
    By Psyve in forum Feedback - Nokia Developer Services & Infrastructure
    Replies: 2
    Last Post: 2007-07-03, 08:39
  3. Replies: 9
    Last Post: 2007-06-16, 08:47
  4. Create Application Package is permanently Disabled
    By Shazard in forum Mobile Java General
    Replies: 2
    Last Post: 2003-08-08, 20:46
  5. Unable to create Application Package
    By pvermeulen in forum Mobile Java General
    Replies: 0
    Last Post: 2003-03-31, 14:31

Posting Permissions

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