|
-
July 11th, 2012, 06:41 PM
#27
Re: Some questions regarding my project
Yo, looks quite interesting that class; didn't come across that myself yet. And referring to the installed languages by name instaed of index (i) really is a good idea, as in many such cases.
One concern that came to my mind was this, though: The input language is set per thread and basic Windows Forms apps are single-treaded in the first place, but some of your controls will need to process foreign language input while others won't. I'm not going to discuss the consequences of that in detail now, since what follows is even more severe and probably will spoil that approach at a quite basic level...
Your reference to that class made me curious as to what input languages actually are installed on my own system (German XP SP3). So I quickly hacked together this little console app, mostly based on the MSDN sample code from the documentation on InpuLanguage::InstalledInputLanguages:
Code:
// Test17.cpp: Hauptprojektdatei.
#include "stdafx.h"
#using "System.Windows.Forms.dll"
using namespace System;
using namespace System::Windows::Forms;
int main(array<System::String ^> ^args)
{
Console::WriteLine("Installed input languages:");
Console::WriteLine();
for each (InputLanguage ^lang in InputLanguage::InstalledInputLanguages)
Console::WriteLine(lang->Culture->EnglishName);
Console::WriteLine();
Console::WriteLine("Hit <Enter> to continue...");
Console::ReadLine();
return 0;
}
And this is its output on my system - no more, no less:
Code:
Installed input languages:
German (Germany)
Hit <Enter> to continue...
Not really many languages I feel an actual urge to learn more about... 
So you'd either need to deploy your program with an installer that installs the required additional input languages or require your users to manually do that themselves. Both not really viable options IMO. So there still just remains the third option we already discussed: Autonomically handle key-to-character mapping in your program yourself.
 Originally Posted by Tusike
[...] Then I can check if such a language layout is installed or not, and if not, kindly ask the user to add to in the control panel.
As pointed out above, chances are there's no input language installed at all other than the system's default language. So it's quite likely the user will need to do that. Not really convenient IMO, compared to the effort for you on the programmer's end to autonomically support foreign language input.
I'm still not expecting a bunch of users though
Well, if you consider to ever become a good programmer some time, even just potentially or remotely, then why not acquire some of the skills one such programmer might use right now?
Last edited by Eri523; July 14th, 2012 at 01:28 PM.
I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.
This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|