views:

217

answers:

3

I am looking for a working code snippet for Symbian S60 5th edition in which:

a) an application can detect the current input language (not the UI language);

b) an application can receive notifications when current input language is changed.

The function CurrentLanguage() from CPtiEngine always returns NULL, so that does not seem to be an option.

Thank you.

+1  A: 

Open the SDK docs ( or http://library.forum.nokia.com ) and search for "PTI Engine API" or CPtiEngine.

Lucian
The function CurrentLanguage from the PtiEngine API does not work.
Bojan Milankovic
+1  A: 

I eventually found the answer on my own. Here is the code:

CAknSettingCache& cache = CAknEnv::Static()->SettingCache();

TLanguage lang = cache.InputLanguage();

Bojan Milankovic
A: 

Hi, How did it work for you? i get Forward Decleration error and "invalid use of undefined type `struct CAknSettingCache' C/C++ Problem.

Thanks.

Omer
You need to include private header file which has definition for CAknSettingCache.
Bojan Milankovic