0

How can one directly input Hindi text into the eclipse IDE on android?

I would like to type Hindi text directly into the eclipse IDE without copy/pasting it from somewhere else, see this demo for an example of writing Hindi text quickly.

I would like to do the same thing in the eclipse IDE.

AAA
  • 19
  • 7
Neeraj Kumar
  • 3,851
  • 2
  • 19
  • 41
  • what you have tried so far – Amy Sep 10 '15 at 05:38
  • i want to write hindi text direct in eclipse IDE without copy paste hindi text from another place – Neeraj Kumar Sep 10 '15 at 05:54
  • @NeErAjKuMaR write hindi text?? You need to use noto fonts to display hindi fonts.https://www.google.co.in/design/spec/style/typography.html. To type hindi fonts say in edittext you needs a custom keyboard that supports the same and read this http://balusc.omnifaces.org/2009/05/unicode-how-to-get-characters-right.html – Raghunandan Sep 10 '15 at 05:57
  • http://transliteration.techinfomatics.com/ that show demo for write hindi text fastly .so that type of technology i want to use in my eclipse IDE – Neeraj Kumar Sep 10 '15 at 06:02

5 Answers5

2

Use hindi texts inside String.xml file like

<?xml version="1.0" encoding="utf-8"?>
<resources>

<string name="hindiText"> पवन कुमार</string>

</resources>

And use this on your app's TextView

<TextView
    android:id="@+id/textView"
    android:gravity="center_horizontal"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/hindiText"
    android:textSize="28sp" />
N Kaushik
  • 2,198
  • 18
  • 29
1

Yes Hindi language can support in Android devices. You need to follow the steps.

Step 1:

Just create one values folder under resources like values-hi and add strings.xml file inside of this folder. You can add your translated strings in this strings.xml file.

example

<string name="your_text">अपका संदेशर</string>

Step 2:

If you call your strings from the other layout xml files then just call like the following

android:ext="@string/your_string"

Step 3:

You can also use string values in java code programmatically.

Amsheer
  • 7,046
  • 8
  • 47
  • 81
1

I think you are looking forward for multi-language(English AND Hindi) support for your application. If so, enter image description here

strings.xml in values folder

<?xml version="1.0" encoding="utf-8"?>
<resources>

    <string name="welcome">accueil</string>
    <string name="email">adresse e-mail</string>
    <string name="password">mot de passe</string>
    <string name="login">connexion</string>
    <string name="signup">Ne pas avoir un compte? signer</string>

</resources>

strings.xml in values-hi folder

<?xml version="1.0" encoding="utf-8"?>
<resources>

    <string name="welcome">स्वागतम</string>
    <string name="email">ईमेल पता</string>
    <string name="password">पासवर्ड</string>
    <string name="login">लॉगिन</string>
    <string name="signup">खाता नहीं है? साइन अप करें</string>

</resources>

for more references please check this link

EDIT (as per the comment)

Try this

1.Windows > Preferences > General > Content Types, set UTF-8 as the default encoding for all content types. 2.Windows > Preferences > General > Workspace, set "Text file encoding" to "Other : UTF-8".

For more references, please check this blog

Ansal Ali
  • 1,583
  • 1
  • 13
  • 30
  • http://transliteration.techinfomatics.com that show demo for write hindi text fastly .so that type of technology i want to use in my eclipse IDE – Neeraj Kumar Sep 10 '15 at 06:37
  • i'm telling you demo what i want.but transliteration can not work in android because i've tried many time so i want another thing that will work as Google transliteration.then why edit my question? – Neeraj Kumar Sep 10 '15 at 06:53
  • I think that is not available in eclipse now., you can request for the same to eclipse team to include or release a plugin for the same. – Ansal Ali Sep 10 '15 at 06:59
0

Use UTF-8 encoding in android studio , below is setting page , using utf-8 encoding will allow you to paste hindi fonts in xml and java code.

enter image description here

For Eclipse IDE : below is path to configure the encoding :

Preferences > General > Workspace > Text file encoding
KOTIOS
  • 11,177
  • 3
  • 39
  • 66
0

Today i found solution of my question.

i found that Google develop many inputtools for windows OS , Android and for Web in many language that use for fastly type any language with the help of English typing.

So i download inputtools at URL : Download Page thank you Everyone for help me

Neeraj Kumar
  • 3,851
  • 2
  • 19
  • 41