Change the Language in text editor Thread last updated on 2004-02-08 06:35:17

Posted by member 47331 on 2004-02-06 14:06:38

Hi, I am using LIteStep (v3.0.2 installer) with themes austerity and Saphardana) on Win XP SP1. The function of changing languages when writting multilanguage docs is not supported. I am working to add this function to the above mentioned shells but untill now I can not succeded. Please advice or link me to the solution if this is already posted.

Posted by member 47331 on 2004-02-06 16:41:21 link

Continue to my request. The solution I use is to have the language bar on the desktop (not minimized). Is any possibility to embody this to LiteStep Shell? Thanks.

Posted by member 7 on 2004-02-07 05:22:12 link

Yup, if you can figure out how it's done. It's mostly undocumented afaict.

Posted by member 111 on 2004-02-08 02:46:00 link

Introduction to WinXP by Seg@ ;)

a) The first true multimedia operating system in the world is WindowsXP by Microsoft Corporation
b) There is no difference between ways for input in multimedia OS: by keyboard, by voice, a handwriting with a special pen or any custom way, implemented via third-party addons
c) The center of such universal input is MSTF - Microsoft Text Services Framework
d) User Interface for MSTF was implemented as so called 'language bar'.
e) Text input for different languages differs :) So language bar contain current input language indicator, and plays a role of old (and obsolete) internat.exe
f) Language bar can be disabled in Control Panel, but it is only a UI, and MSTF server dll has been already loaded by OS, so everything will work fine with any shell (*solution*)
g) Language bar can be in some states: Normal, Docked, Minimized, Hidden and Deskband
h) When WinXP's user minimizes floating language bar, LangBar changes the state to the 'Deskband' and hides own main window. There are two possibilities after that:
1) 90% Explorer catches this situation using ITfLangBarEventSink interface and creates one more Language Bar on it's taskbar using a 'secret MSTF API' (*solution*)
2) 10% MSTF looks for special windows, which must be created by Explorer, to made a 'MiniLangBar'
i) When user starts a new application (for example, editor) and this app creates a new window, it must be 'registered' by MSTF. I don't know how and by whom, but it is a fact. If Language Bar mode is DESKBAND and there is no second Language Bar on Explorer's tasbar, registration hanged until second bar would show up (Explorer started) or LangBar mode be changed via Control Panel or by special app (*solution*).
j) Keyboard layout switching fails if window wasn't registered.

Ok, so we found 3 solutions (two ugly and one perfect [though somebody said that there is nothing perfect in our world :)]) :

1) To disable Language Bar from the Control Panel (ugly since it dropped some functionality)
Disadvantage: we'll lost input language indicator
Improvement: run alternative language indicator, for example RusLat (v2.0.0 is universal, so it is possible to add any language. Greek is one of the default language)
litestep.bip.ru/download/ruslat-2.0.zip (look at BIN folder)

2) To catch DESKBAND state change and replace it with HIDDEN (ugly since it isn't finished yet)
Example of implementation: langtest module
litestep.bip.ru/download/langtest.zip (just unpack langtest.dll add LoadModule line to the step.rc)
Disadvantage: Language Bar can be minimized but cannot be maximized again
Improvement: is is possible to merge langtest.dll and RusLat.exe code to add 'Restore language bar' menu entry for the systray icon. I have no anough free time yet for it.

3) To find a 'secret API'. Probably it is not so secret, just I didn't found it... Read MSDN about Text Services Framework and about ITf* interfaces. For example, ITfInputProcessorProfiles staff is really interesting :)

Wish you luck!

Posted by member 47331 on 2004-02-08 06:35:17 link

Thanks for the respond, I will start working with your advices.