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?
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.
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.
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 क्रुपया
Related
I am designing an android application which also have burmese language support. But eclipse juno dosen't support burmese language, any idea how to make it work.
What you need to do is create a separate language resource, strings.xml, which will contain all the Burmese translations for the texts you are displaying in the application. You should also have the English texts stored in strings.xml in a similar manner. Do not use hardcoded string anywhere for display.
Now, depending upon the user's language choice, you would display the strings using R.string.xxx.
NOTE : Make sure you have Eclipse file encoding as UTF-8 not as the default Cp1252.
I have a rooted phone and was trying to play around with my phone. It has android 2.2 installed. What I want to do is to display Hndi/Tamil/Telugu text inside the application that I was trying to develop. Obviously android 2.2 does not support these fonts.
As the phone is rooted doing this was easy for one language. I just followed the tips given in this link Enable Hindi Fonts on Rooted Device and was able to get Hindi fonts throughout the system. Similar approach helped me setup Tamil fonts.
But I am not able to make both Hindi and Tamil work together. The possible solutions I can think off are :
i) Create a common ttf file which shall contain both Hindi and Tamil fonts. But I have no idea whether this is possible or not.
ii) Keep a .ttf file for each language in the assets/fonts/ folder but again this is showing just square boxes on the device.
I tried this link Display Different Languages In Applicationtoo but again this seems to work for only supported fonts.
Any guidance would be highly appreciated. Thanks
Try this sample application.I shared here the whole application code for how to display one text in multiple languages especially Kannada and Telugu.
I have android application developed in English language and also have content in English. Is this possible that all texts are converted in other language like in Chinese or Japanese, then How? some sample code or tutorial will help me lot.
I am able to get language selected through setting with code as follows.
Locale.getDefault().getDisplayLanguage()
The usual way to do this is to:
Enter your strings in a strings.xml file in the /res/values/ folder of your project. You can then define different localizations of your string file by added them to the localized /res/values/ folders. ( /res/values-jp/ or /res/values-en/ etc.)
See: Developer Android
We can also use translation api. Refer this Link
http://www.creatiosoft.com/how-to-use-microsoft-translation-api-in-android/
I would like to set my emulator locale to some custom locale for Indian regional languages like Tamil or Kanada or telugu. Any one plz give suggestions, Thanks in Advance.
you must download your language font file(.ttf). after,import font file in your project assets folder create folder fonts and paste your font file(.ttf) to folder fonts.
after following instructions in below link for stack overflow post :
Android Tamil font between english word
(or)
Refer this document
http://developer.android.com/training/basics/supporting-devices/languages.html
iso code for all languages link below
http://www.w3.org/WAI/ER/IG/ert/iso639.htm
Welcome...!
It is my fault not clearly understanding android documentation link given below
http://developer.android.com/guide/topics/resources/localization.html
For others sake,
Creating and using a custom locale is for developers to test localization apps in android emulator.There are two ways to create custom locale for more see above link.
* Use the Custom Locale application, which is accessible from the Application tab. (After you create a custom locale, switch to it by pressing and holding the locale name.) In my case I given te_IN for telugu(Indian) locale.
* Change to a custom locale from the adb shell
I am just confused by checking custom locale app in device.
Also, Right now there is no default locale support for Indian regional languages except for Hindi, for which code is hi_IN, that too in Android 4.0.3. So even though we set Custom locale to telugu Indian i.e te_IN, Android system will not identify telugu fonts. Any suggestions on this? I want this on Android 2.2 version.
I have these codes that are from a database. They represent Devangari (Hindi) script:
समोसा
I have a Hindi font installed on my phone.
How I get these codes to display as Hindi script in my Android app?
for a TextView, try .setText(android.text.Html.fromHtml("समोसा")