LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 06-05-2009, 01:18 AM   #1
linus_trivaldo
LQ Newbie
 
Registered: Dec 2007
Posts: 5

Rep: Reputation: 0
Always return the current locale of the system.


Hi all,

How to enable inscript keyboard in a JTextPane?

I am working in fedora8 and using java1.6.0_05.

I tried the following codes to set keyboard Locale.

InputContext it = InputContext.getInstance();
if (it.selectInputMethod(new Locale("ml", "IN", "")))
System.out.println("Locale successfully changed");
else
System.out.println("Locale change failure");
}


It always print "Locale change failure", for all the locales except the system default locale.

But when i tried this in windows , there seems to be no problem, It's working and I am able to type in my language(ml).

So how to do this in linux?

Any help will be gratefull.
 
Old 06-05-2009, 07:09 PM   #2
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
Have you tried Locale.getAvailableLocales() to see which Locales are available? Have you installed the proper locale on the system?
 
Old 06-11-2009, 11:33 PM   #3
linus_trivaldo
LQ Newbie
 
Registered: Dec 2007
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Matir View Post
Have you tried Locale.getAvailableLocales() to see which Locales are available? Have you installed the proper locale on the system?
Thanks for you reply
I tried to get Locales by Locale.getAvailableLocales(). These are the locales available


ja_JP
es_PE
en
ja_JP_JP
es_PA
sr_BA
mk
es_GT
ar_AE
no_NO
sq_AL
bg
ar_IQ
ar_YE
hu
pt_PT
el_CY
ar_QA
mk_MK
sv
de_CH
en_US
fi_FI
is
cs
en_MT
sl_SI
sk_SK
it
tr_TR
zh
th
ar_SA
no
en_GB
sr_CS
lt
ro
en_NZ
no_NO_NY
lt_LT
es_NI
nl
ga_IE
fr_BE
es_ES
ar_LB
ko
fr_CA
et_EE
ar_KW
sr_RS
es_US
es_MX
ar_SD
in_ID
ru
lv
es_UY
lv_LV
iw
pt_BR
ar_SY
hr
et
es_DO
fr_CH
hi_IN
es_VE
ar_BH
en_PH
ar_TN
fi
de_AT
es
nl_NL
es_EC
zh_TW
ar_JO
be
is_IS
es_CO
es_CR
es_CL
ar_EG
en_ZA
th_TH
el_GR
it_IT
ca
hu_HU
fr
en_IE
uk_UA
pl_PL
fr_LU
nl_BE
en_IN
ca_ES
ar_MA
es_BO
en_AU
sr
zh_SG
pt
uk
es_SV
ru_RU
ko_KR
vi
ar_DZ
vi_VN
sr_ME
sq
ar_LY
ar
zh_CN
be_BY
zh_HK
ja
iw_IL
bg_BG
in
mt_MT
es_PY
sl
fr_FR
cs_CZ
it_CH
ro_RO
es_PR
en_CA
de_DE
ga
de_LU
de
es_AR
sk
ms_MY
hr_HR
en_SG
da
mt
pl
ar_OM
tr
th_TH_TH
el
ms
sv_SE
da_DK
es_HN


My language dependent locale is missing there. But when i used the cmd 'locale -a' in terminal. It returns
ml_IN
ml_IN.utf8
.
why this difference?
May be as you said the locale is not installed properly. How to do it?

Regards
linus
 
  


Reply

Tags
keyboard, linux


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change the locale by setting the system default locale letdoit Slackware 6 08-18-2011 03:34 AM
Linux system locale questions xhsoldier Programming 11 03-10-2009 10:52 PM
How to change system wide locale? Tux-Slack Slackware 1 07-09-2007 07:34 AM
system locale sanjay2k4 Linux - Software 3 06-14-2006 11:47 AM
C locale and system locale johnnydangerous Fedora 4 04-11-2005 03:37 PM


All times are GMT -5. The time now is 11:33 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration