Reputation: 31
I am trying to learn/build my first few apps on android using android studio. Apart from default language, I wanted to add support for HINDI language. I have created strings.xml file required for hindi and I have verified that whatever string I put in this file is displayed correctly when HINDI language is selected on Android device. To try this, I just wrote different sting in English characters, because I am unable to figure out how to write in HINDI in android studio.
For eg. I want something like this in my hindi strings.xml
<string name="customer_name">क्रुपया अपना नाम लिखे</string>
Currently I just have this in my XML:
<string name="customer_name">Please enter your name</string>
Could someone please provide on what should I do to type directly in hindi language in android studio xml?
Upvotes: 2
Views: 6358
Reputation: 122
I would suggest you to use Google translator to translate your strings from English to Hindi and copy the Hindi translation by clicking on the button as highlighted in this image.
And paste it into your strings editor in Android Studio like this:-
If you don't want to use third party translators and want to write your own Hindi version of the strings, then I think you can look into the suggestions by the other folks.
Upvotes: 0
Reputation: 1036
Not sure whether your problem is Hindi typing or Android Localization.
There are many options. You can use a mobile keyboard.
You can use transliteration which is a word-level conversion from Roman to Hindi. or Microsoft Indic tool which is a char level conversion to Devanagari chars.
There is no learning curve in using transliteration. Transliterators are provided by Google and Microsoft both.
Microsoft transliterator and indic tools both are available here.
https://www.microsoft.com/en-in/bhashaindia/downloads.aspx
By the way, the right spelling is कृपया not क्रुपया
Upvotes: 0
Reputation: 1
Not sure whether this has been answerd already or not, but I did it by typing the words/phrases in Microsoft Word using Hindi keyboard, and then copy-pasted the text into Android Studio Translation Editor.
Upvotes: 0
Reputation: 329
You could use on-line Hindi editor like http://www.quillpad.in/editor.html and then copy paste your words in the android studio translation window.
Upvotes: 1