Click here to Skip to main content
15,917,645 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
how to fill dropdownlist contain language name of all languages in world and
When i select Urdu in drop downlist my textbox1 language automatically start writing in urdu or When i select 'English' text boxes support english
when i select hindi textboxes support only hindi or when i select french from dropdown list my textboxes automatically support french lanuage only


problem? How to manage this which tool is best supported for that ?

C#
List<string> lan = new List<string>();
          CultureInfo[] cultures = CultureInfo.GetCultures(CultureTypes.AllCultures);

          foreach (var culture in cultures)
          {

              if ((culture.CultureTypes & CultureTypes.UserCustomCulture) ==   CultureTypes.UserCustomCulture)
                  continue;


              if (culture.TwoLetterISOLanguageName.Length == 2)
                  continue;

           lan.Add (culture.EnglishName  );
          }
          radDropDownList3.DataSource = lan ;


not solve my problem because not giving complete list of language pack like URDU , ENGLISH , ARABIC , HINDI missing
Posted
Updated 16-Jan-16 5:05am
v2
Comments
BillWoodruff 16-Jan-16 8:03am    
What have you tried so far ? Have you searched CodeProject ?
Engr Nouman 16-Jan-16 11:08am    
check now
Richard MacCutchan 16-Jan-16 8:45am    
I doubt that there is any tool that could do all that. You would need code in your application to handle each language's alphabet, and presumably, some sort of translator service.

There is no such tool.

The system will not start converting a keyboard into an appropriate language for you. It will also not start converting text between languages for you either.

Your code has to provide the resource files to represent the strings your application uses, such as the text in Labels and other controls, translated by YOU. Each resource file will hold the string your use for one particular language.

Start reading these[^] for more information on Localization and Globalization.
 
Share this answer
 
Comments
Engr Nouman 16-Jan-16 11:07am    
must check i have to populate drop downlist with language and phoneic automatically detect language from drop downlist and keyboard input will be in that language and also
i get using culture info but i donot need this techninque as not perfect now microsft transalotor but how to use the
Dave Kreskowiak 16-Jan-16 12:02pm    
Your statement made no sense at all. I have no idea what you're really trying to do.
Sergey Alexandrovich Kryukov 16-Jan-16 15:48pm    
The Engr's problem is deeper, that's why. It's about understanding or more basic things than even programming. Please see Solution 2.
—SA
Dave Kreskowiak 16-Jan-16 16:58pm    
If you can understand that pile of word salad, more power to you.
Sergey Alexandrovich Kryukov 16-Jan-16 17:48pm    
Well, I agree with you. I just don't need to understand the whole salad. Main problem still can be figured out. Even the word salad has its reasons.
—SA
First of all, you notion apparatus is probably broken, or perhaps your terminology is too much off. However, I can see many signs that the real problem is worse than just terminology. First, let's dismiss "phonetics". Entering texts has nothing to do with phonetics, it's text. Perhaps you have read a bit to understand what is phonetics, it's about sounds of speech, not characters you enter; there is a big distance between these aspects of human speech: Phonetics - Wikipedia, the free encyclopedia[^].

Now, about cultures and languages. This is not the business of text boxes or any other controls. This is the responsibility of the whole application, formally, of some or all of the application threads. (Please see the documentation on System.Threading.Thread, https://msdn.microsoft.com/en-us/library/system.threading.thread.currentculture(v=vs.110).aspx[^], https://msdn.microsoft.com/en-us/library/system.threading.thread.currentuiculture(v=vs.110).aspx[^].) I don't want to further discuss cultures here, please see Solution 1; the problem is even deeper.

When it comes to "start writing in Urdu… English", and so on, the problem is the general understanding of computing culture, in this case, relationships between the user, OS and an application. When it comes to a text box, nothing "starts writing in Urdu" (or any other language) but the user. This is the use who has enter some characters. Nothing should be automatically switched. The user should be able to enter characters of any language at any given moment of time. If the status of application cannot except some characters, it could be a matter of validation, in worst case — filtering. If you want to learn how to filter out some characters, I can help you (or you can figure out how to do it all by yourself), but this is not your real problem. Your problem is understanding. What is the current input language should not be decided by the application. It should be decided by the user and only by the user. This is done via choosing one or another input method and input language, which is done via the OS tool, such as the language control element on the Windows taskbar. You can contribute, in particular, to available layouts, by developing and installing your own. How to do that? I explained it in my past answer: Problem in typing in Hindi and english[^].

Important note: it allows the user to enter fragments in different languages in a single string. But this how modern computing culture works. In nearly all modern OS, all texts are based on Unicode. Rare applications not based on Unicode are either obsolete or solve application problems where the languages are majorly irrelevant (and are still obsolete). .NET strings are Unicode strings and nothing else. Non-Unicode encodings are still marginally supported, for some objects which are not strings, such as streams. Important point here is: the input method/language choice should be separated from the application.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900