×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Sep 2009
    Location
    Bangalore, India
    Posts
    49

    Post Help for Localization in LWUIT..

    Can anyone please help me to use localization in LWUIT.. ???
    Please kindly provide me any links to the tutorials or any code sample ...

    Thanks in advance
    Regards
    Nilanchala

  2. #2
    Registered User
    Join Date
    Oct 2009
    Location
    Noida
    Posts
    941

    Re: Help for Localization in LWUIT..

    Quote Originally Posted by nilanchalapanigrahy View Post
    Can anyone please help me to use localization in LWUIT.. ???
    Please kindly provide me any links to the tutorials or any code sample ...

    Thanks in advance
    Localization is builtin - You can install a "resource bundle" (Hashtable in LWUIT, ME has no resource bundles), into the PLAF and most of the components (buttons, labels, checkboxes etc...) will be automatically localized.

    http://docs.google.com/viewer?a=v&q=...Zki_nbMxEkQ8qw

    Useing Resource editor you can enter the key,value pairs of all string used in the application and different locale and select or load on at runtime to be used in the app.
    Thanks,
    Ekta

  3. #3
    Registered User
    Join Date
    Sep 2009
    Location
    Bangalore, India
    Posts
    49

    Re: Help for Localization in LWUIT..

    Hi Ekta..
    Good morning.. Thanks fot your support.. But Yaar.. I made use of resource editor and i did the key value pairs.. Now i m ready with my "local.res" file..
    Can You please provide me some sample code to load and use in our program.
    Regards
    Nilanchala

  4. #4
    Registered User
    Join Date
    Oct 2009
    Location
    Noida
    Posts
    941

    Re: Help for Localization in LWUIT..

    Quote Originally Posted by nilanchalapanigrahy View Post
    Hi Ekta..
    Good morning.. Thanks fot your support.. But Yaar.. I made use of resource editor and i did the key value pairs.. Now i m ready with my "local.res" file..
    Can You please provide me some sample code to load and use in our program.
    Some code-lets for your help:
    Code:
    try
    		{
    			Resources res = Resources.open(MIDlet.class.getResourceAsStream("/strings.res")); // where string.res in your resource file which as locale as language resource in it.
    			locale = res.getL10N("locale","name of needed language loacle matching to value column in res file" );//Dynamic resource initialized into a locale hashtable
    		}
    		catch(Exception e)
    		{
    			System.out.println("Exception in loading resource from jar");
    		}
    
    /// using locale based string
    String welcome = (String) locale.get("key.welcome");
    g.drawString(welcome);
    textArea.setText(welcome);
    Thanks,
    Ekta

  5. #5
    Registered User
    Join Date
    Sep 2009
    Location
    Bangalore, India
    Posts
    49

    Re: Help for Localization in LWUIT..

    Thanks ekta.. I got it.. I am able to use now..
    Regards
    Nilanchala

Similar Threads

  1. LWUIT and arabic localization
    By the_king2008 in forum Mobile Java Tools & SDKs
    Replies: 8
    Last Post: 2011-08-08, 20:51
  2. Localization
    By Arunesh in forum Mobile Java General
    Replies: 9
    Last Post: 2009-10-21, 11:26
  3. about localization
    By ceehira in forum Symbian
    Replies: 2
    Last Post: 2005-08-05, 07:29
  4. About localization
    By kellygeng in forum Symbian
    Replies: 0
    Last Post: 2004-06-29, 01:44
  5. Localization
    By Nokia_Archive in forum Browsing and Mark-ups
    Replies: 1
    Last Post: 2002-05-15, 02:51

Posting Permissions

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