Laxmikant Dange
Laxmikant Dange

Reputation: 7688

How to Change input language of textbox in html?

I want to change language of textbox to marathi in html file My code is as follows but it not working

<html lang="mr" xml:lang="en">
<head></head>
<body>
<textarea style="height:200px;width:200px;font-family:Mangal">
</textarea>
</body>
</html>

Upvotes: 0

Views: 9609

Answers (4)

myk.
myk.

Reputation: 333

there is no tags in html which will allow you to type in marathi. You can download specific tools

http://www.google.co.in/inputtools/

http://t13n.googlecode.com/svn/trunk/blet/docs/help_mr.html

but it will not be specific to certain div or tags it will get applied to every application.

Upvotes: 1

RJ Rajan
RJ Rajan

Reputation: 46

Perhaps you could use the Google Input Tools

Install it with Marathi pack and you could start typing in Marathi

http://www.google.co.in/inputtools/

A draw back is that it should be installed on all the systems the application uses.If it's an intranet app then it would be fine.

Upvotes: 1

Anton
Anton

Reputation: 9961

It could not be done using html tag attributes, css styles or Javascript

Upvotes: 1

balexandre
balexandre

Reputation: 75073

I hope you meant Font and not language...

first of all, give that textarea an id and a class, for example

<textarea id="txtArea" class="textarea" style="height:200px;width:200px;font-family:Mangal">
</textarea>

then let's get ride of that bad inline style coding and have either an external stylesheet or inside the <head> this:

<style>
    .textarea { height:200px; width:200px; font-family:Mangal }
</style>

so now it would be clean as

<textarea id="txtArea" class="textarea">
</textarea>

to change the font, just do:

from javascript

txtArea.style.fontFamily = "Arial";

from stylesheet

.textarea { height:200px; width:200px; font-family:'Arial' }

or, if you can't ride the inline styles, add the id and call the javascript.

I don't recall if the font-family:'Arial' !important gets prioritize from an inline style, but you can also try that.

Upvotes: 1

Related Questions