3

I am trying to create one web site in Kannada using asp.net c# in visual studio 2010.this web site is a simple web site with one button,2 labels and 2 text boxes.I want to display the values in Kannada. and while typing only it has to come in Kannada. But i am unable to include that font to the text boxes labels etc.. can any one tell me which are the other software i need to use. To do this i downloaded Kannada fonts. can i achieve this without using translators.?. can any one tell me how i can do this?.... how to include Kannada font to my website?....

Raghuveera
  • 320
  • 3
  • 9
  • 27

5 Answers5

1

Generically, you can use a custom font using @font-face in your CSS. Here's a very basic example:

@font-face {
    font-family: 'YourFontName'; /*a name to be used later*/
    src: url('http://domain.com/fonts/font.ttf'); /*URL to font*/
}

Then, trivially, to use the font on a specific element:

.classname {
    font-family: 'YourFontName';
}

more

Community
  • 1
  • 1
Mr.LamYahoo
  • 1,536
  • 13
  • 28
  • can i get some url for fonts?. I got BRHVEDIC font it is not working. if this is the right one can you please tell me other than the above code what else i need to add. @font-face { font-family: NuvoWeb; src: url(/NuvoWeb-Medi.eot); } i include this css file in my web page. what else i have to do? – Raghuveera Oct 17 '13 at 10:21
  • Can i give the url of my c:/ or d drive – Raghuveera Oct 17 '13 at 10:29
  • Note that certain font-formats don't work on all browsers, use fontsquirrel.com's generator to avoid making too much effort converting. – Mr.LamYahoo Oct 17 '13 at 10:51
  • @Raghuveera - that font needs to be downloaded by the visitor's browser, which doesn't have access to *your* C: or D: drive. Put that fontfile in your site and have the browser get it from there. – Hans Kesting Oct 17 '13 at 11:52
0

Use Localization Concept. It is done using Resource files.

The .NET framework provides support for localization. Localization deals with customizing data and resources for specific culture or locale or language. Supporting localization is important for an application if the application is required to be customizable based on the respective culture.

Following article will help you to do your task.

http://www.codeproject.com/Articles/5447/NET-Localization-using-Resource-file

Ramesh Roddam
  • 243
  • 1
  • 2
  • 14
  • Hi Ramesh, could you please explain here what resource file contains(i means which script) and how to handle multiple language support.? – kiran Oct 17 '13 at 10:13
  • Its just easy you need to maintain a resource file.Resouce file contains key value pairs. One resource file for English and other resource file for kannada. Here keys are same but the value varies for kannada you can use kannada language.2 files one for english and one for kannada. You can give option for the user to select language. Instansiate by using this CultureInfo ci = new CultureInfo("en-GB") Later when ever you want to access the key from the resource file. – Ramesh Roddam Oct 17 '13 at 10:25
  • 1
    you can use this . For this Your Resource file names should be Generic.en.resx and Generic.kn.resx. – Ramesh Roddam Oct 17 '13 at 10:26
  • hi Ramesh i downloaded one kannada font .ttf file. and i have included also. but i am not able to get Kannada character. I am using VS2010 any thing else i need to add. how i can include that ttf file to my web page? – Raghuveera Oct 17 '13 at 10:52
0

You may use unicode UTF-8 to display Kannada. Save the labels text in UTF-8 and add the following lines in your web page:

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
...
</head> 
  • I added this line also. Can i add this src: url('http://domain.com/fonts/font.ttf'); like 'c:/fonts/font.ttf' like this? – Raghuveera Oct 17 '13 at 10:37
0

I think The Karnataka peoples speak and read some type of languages , So i don't know what type of the language needed you .

But Any type of language file can download here and you can try your self by using this sample code

Ramesh Rajendran
  • 37,412
  • 45
  • 153
  • 234
0

For taking user input in kannada, you can create a custom Text box control as described here

also you can get rid of resource files by using google website Translator which translates your page on the fly. you just need to set you default language as Kannada

Rahul Patel
  • 500
  • 3
  • 11