Hi,
I am developing an application for Nokia E71.
Is there any way (Nokia API or anything else) that can get the input language at runtime?
Thanks in advanced,
Yaniv
Hi,
I am developing an application for Nokia E71.
Is there any way (Nokia API or anything else) that can get the input language at runtime?
Thanks in advanced,
Yaniv
This:
Will (on all Nokias, and most other devices) return current locale, either as "xx" (where xx is the two-letter, ISO-639 language code, always lower-case) or "xx-YY" (where YY is the two-letter, ISO-3166 country code, always upper-case). This is part of the MIDP specification, not Nokia specific, but note that null is a valid return value.Code:String locale = System.getProperty("microedition.locale");
For example, values for English include "en", "en-GB", "en-US", "en-CA", etc.
The current UI locale probably reflects the input language.
Hope this helps.
Graham.
Hi Graham,
Thanks for your reply.
However, the System.getProperty("microedition.locale") returns the OS language, not the input language.
In other words, the OS UI can appear in english, but when writing text, the input language can be changed by the user.
What i'm looking for is the current input language that the user has set.
In this case, System.getProperty("microedition.locale") will return "en-US" regardless of the input language.
My question is whether or not there is a way of getting this input language?
Thanks in advance,
Yaniv.
Yes, you are correct, and no, there is no way specifically to get the input language.
Graham.
Yanivalmog,
You may need to accept the user's input and then try to identify the device language from user's Input content itself (may be unicode or ASCII vaules of the entered text or using some lauage identification algo;s or webservices).
thanks,
~Amitabh
Hi,
Can you provide more context? Why do you care about the input language? I'm not saying you shouldn't care, I'm just trying to understand what you will do with this information. For example, are you interested so that you can present messages in the appropriate language? I have a few ideas that may be helpful, but knowing your purpose will be helpful in providing suggestions.
Last edited by mattbrenner; 2009-12-19 at 20:22. Reason: type
Cheers,
Matt Brenner
UnME2, Inc.