none
How to use local language c#?

    General discussion

  • Hi Frnds,

              I need to develop a multi language application.

    My doubt is, i have one textbox, now set font is Tamil Font(or any other). Now i want to store the data to sql. So i just get that textbox value to one string.

    I mean i typed on textbox 'தமிழ்'. But

    string _svStrin=textbox.text;

    now i got _svStrin value is 'Thamiz';

    then how can i store that original word('தமிழ்') in sql Nvarchar???.

    Please help me! How to use Tamil or other language in c#. and How to get?

    • Moved by edhickey Thursday, June 09, 2011 1:49 PM (From:.NET 3.0/3.5 Windows Workflow Foundation)
    Thursday, June 09, 2011 6:52 AM

All replies

  • nvarchar supports UNICODE, you have to be able to store this Thamiz language to sql, do u pass this 'தமிழ்' word to sql?
    Esref DURNA
    Monday, June 13, 2011 9:32 AM
  • Im facing the same issue.......... :( :(... could you please help me to resolve this?  As Sathya said.. i have textbox in the winform.. font set to tamil.... when i type the text box show in tamil as 'தமிழ்' but when i get the value as textbox1.text it show me 'thamiz' and the same is getting stored into the database.

    We need the word 'தமிழ்' that is typed in the textbox to be stored as it is to database and it should be stored as 'thamiz'.

    Durna... u asked do u pass this 'தமிழ்' word to sql? -- when we try to pass we see text passed as 'thamiz' not as  'தமிழ்'.

    i beleive i have clearly explained.....

    Please help...

    Thursday, June 16, 2011 11:33 AM
  • hey guys, i got it.

    Declare

    InputLanguage Lang;

    then get all installedlanguages or put like

    lang.Culture.EnglishName == "Tamil (India)"

    then assign

    InputLanguage.CurrentInputLanguage = Lang;

    now type on ur textbox and den save, hey must use nvarchar in sql server.

     

    Saturday, June 25, 2011 10:29 AM
  • somone sent me this code before , try and change arabic to indian

     

     private InputLanguage GetArabicLang()
        {
          //Enumerate through InstalledInputLanguages which contains 
          //all the keyboard layout you've installed in your windows. 
          foreach (InputLanguage lang in InputLanguage.InstalledInputLanguages)
          {
            if (lang.LayoutName.ToLower() == "arabic (101)")
              return lang;
          } return null;
        }
    
        public void ChangeLan()
        {
          InputLanguage lang = GetArabicLang();
          if (lang == null)
            throw new NotSupportedException("Arabic Language keyboard is not installed.");
          //Set the current language of the system to 
          //the InputLanguage instance you need. 
          InputLanguage.CurrentInputLanguage = lang;
        }
    

    and call in in load event of the form


    Hesham Hemdan Saleh
    Saturday, June 25, 2011 3:38 PM
  • Hello,

    I am getting the same problem, I am able to type in marathi language but i am getting textbox text value in to english character.

    I tried above mention steps,(Set culture to marathi also enabled the marathi keyboard) but not working for me.

    I need to get text box text value in marathi and store in sqlserver.

    Please help.

    Thursday, March 22, 2012 12:53 PM
  • Whats the problem with that text. If u using some font which uses English phonetics to represent the word means, those word will always have English letter.
    • Edited by CoolMonster Thursday, January 02, 2014 5:23 AM
    Thursday, January 02, 2014 5:22 AM