Globalization for Windows forms

Posted by Gpt under Windows Forms on 9/19/2015 | Points: 10 | Views : 1357 | Status : [Member] | Replies : 1

I am trying to display a word document which has text in "Telugu" into windows forms application using either Rich Text Box control or any other out of box control using visual studio 2012. Can some one please help me how to achieve this. I am able to display text from word file which is in English language, but I want to display the text in "Telugu" language (one of the Indian popular language).
Appreciate your inputs and help

Here is my code:

private void btnRead_Click(object sender, EventArgs e)
CultureInfo ci;
Thread.CurrentThread.CurrentCulture = new CultureInfo("te-IN");
Thread.CurrentThread.CurrentUICulture = new CultureInfo("te-IN");
ci = Thread.CurrentThread.CurrentCulture;

Microsoft.Office.Interop.Word.Application wrd = new Microsoft.Office.Interop.Word.Application();
object miss = System.Reflection.Missing.Value;
object path = @"C:\Sample\XYZ.docx";
object readOnly = true;
Microsoft.Office.Interop.Word.Document docs=wrd.Documents.Open(ref path, ref miss, ref readOnly, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss,ref miss, ref miss, ref miss, ref miss);
string totaltext = "";
for (int i = 0; i < docs.Paragraphs.Count; i++)
totaltext+=" \r\n "+ docs.Paragraphs[i+1].Range.Text.ToString();
rTxtDoc.Text = totaltext;



Posted by: Rajnilari2015 on: 9/26/2015 [Member] [Microsoft_MVP] [MVP] Platinum | Points: 25

First download Tamil font and install your pc.Then change the controls font name corresponding to the tamil font as under

Drag andDrop RichTextBox on to your Windows Form,then Press F4 For Property Window.
Perform the below settings
Font -> Tamil Bible, 8.25pt, style=Bold

Hope this helps

Thanks & Regards,
RNA Team

Gpt, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response