arabic letters from a file in eclipse android - android

I'm trying to retrieve Arabic words that I stored in a text file and display them in my android application, any idea on how to display Arabic letters or words in my app? I've tried different kinds of methods like using the ArabicReshaper and this is an example of the code:
tx=(TextView)this.findViewById(R.id.tt);
try{
tx.setTypeface(Typeface.createFromAsset(getAssets(),"dejavusans.ttf"));
tx.setText(ArabicUtilities.reshape("\u0641\u0631\u0633"));//
}
but I need another way instead of using the Unicode for each Arabic letter and connecting them. Can I not write the Arabic word directly into eclipse?

Related

How to Store (and Retrieve) Non-English Characters (e.g. Hindi, Czech, Arabic etc.) in SQL Server in Android

I have a problem in Android Programming.I need to post non-English character to server and get non-English character from server in my android code and when I try to do this I face with some characters like " ااننننتبو". anybody can help me?
here is codes for post data :
String data=URLEncoder.encode("username","UTF-8")+"="+URLEncoder.encode(User,"UTF-8");
data+="&"+URLEncoder.encode("matn","UTF-8")+"="+URLEncoder.encode(Matn,"UTF-8");
data+="&"+URLEncoder.encode("status","UTF-8")+"="+URLEncoder.encode(Status,"UTF-8");
If you want your app to support multi-language, you need to have corresponding locale strings available in xml/strings files...
If it is just a few characters like font icons, you can store them in strings resource file.
Check your device whether the language is installed, or try using
Html.fromHtml( "<html><body>"+response+"</body></html>");

How to use tamil text as input in android

I am creating an android application in which i have used the south indian language to display the text in tamil for which i have converted all the strings to tamil but i need to give the inputs in edit text as tamil.
How can i do this if the user doesn't have a tamil keyboard installed with them can anyone show me some examples for input the text in android with local languages.What i have done so far is converted the strings to tamil but i want to give the inputs in tamil.I have tried using some examples which gives the values as tamil but it dosn't shows how to give the inputs in tamil.
The only option would be to create a custom Keyboard for your app, you have little to no control over the system InputMethod.

display contents in different languages

Currently, I have a txt file that is formatted (using delimiters) in a specific way. I read the file, parse it and populate the GUI of the app.
I need to make the multi-lingual app so basically display non English characters. I have 2 ideas in mind:
Write the file in non English and read it/parse it based on the mobile language.
In the English file, I change the actual contents to be reference to String ID. These ID are the ones in String.xml. When I read the file, I parse the ID and call the corresponding string. I will let Android figure out the system language and pick the appropriate String.xml
OR completely different solution that you recommend

Punjabi/Telugu/Tamil on Android using unicode UTF-8

I am trying to display text in Indian regional languages on an Android app.
I've set up all the localization folders even though, I just want to have only one language for my app (say Punjabi).
In my strings.xml I have tried putting Hindi characters and Chinese characters and these are displayed correctly on the emulator. But when I put in Punjabi characters nothing shows up on the emulator.
Any reason for this? Can I overcome this problem?
I have the option of using a .ttf file in the assets folder for punjabi font. But that is not what I want to do because it does not give me complete control over the contents being displayed. Each .ttf behaves differently.
Any help is truly appreciated.
There is no support for local Indian languages on Android as yet. Hence the UTF-8 characters that fall outside the acceptable range for Android are ignored. Hence we see a blank being displayed.

Android: How can I make this "समोसा" appear as Hindi characters in my app?

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("समोसा")

Categories

Resources