Quick question: Can I use the Myanmar Language in an Android App? I guess the bigger question here is about unicode in general but I don't know what to ask about that.
Start from Android 4.3 , you can use Myanmar language in the app. Myanmar unicode has no more problem. However, Android still not support Myanmar language in default.
You can use Zawgyi or Unicode correctly in Android 4.3
You can use ttf font with #Ye Lin Aung mention
tv_mm3 = (TextView) findViewById(R.id.tv_mm3);
Typeface tf_mm3 = Typeface.createFromAsset(getAssets(), "fonts/mm3.ttf");
tv_mm3.setTypeface(tf_mm3);
For web, ttf font embed can't work. You need to use svg for Zawgyi. However, unicode ttf font can't work in android 4.3. It can't render after convert svg font. So, default webview with unicode is possible now.
for WebView , you need to put zawgyi svg font under the asset folder.
#font-face {
font-family:'Zawgyi-One';
src:url('file:///android_asset/fonts/zawgyi.svg');
}
If you want to use unicode in webview , you can use chromeview from https://github.com/pwnall/chromeview
I hope, my answer is useful for you.
Update:: Android 4.4 support Myanmar unicode and zawgyi show well on app and webview.
Disclaimer : I am a developer from Myanamr.
Yes. You can but it's not fully supported yet, IMHO. You can embed the font by using typeface.
You have to put your desire font in the assets folder first. Something like this will work.
tv_mm3 = (TextView) findViewById(R.id.tv_mm3);
Typeface tf_mm3 = Typeface.createFromAsset(getAssets(), "fonts/mm3.ttf");
tv_mm3.setTypeface(tf_mm3);
Slightly off topic, but I suggest you to try with a few fonts (either Unicode fonts or not). The rendering will be incorrect depends on the Android API version.
On latest API version 4.3, the Myanmar texts with Unicode fonts are rendered correctly on the TextView. I think it's enough for most of the applications. My suggestion is to use Myanmar3 Unicode font.
Language support comes in two stages:
The device needs to be able to print the languages' characters. Android has full UTF-8 support. This means you can print Strings in any language on the screen. BUT: Not all characters supported by the system are included in the default fonts. E.g. Tamil fonts are available, Sinhalese fonts are not.
Android official language support allows you to set the phones locale to whatever is available. The list of available locales is linked in the other answer. Being on that list means: the user can set the language of the app and the whole system. And you can have folders like res/values-de to show locale specific strings.
To test 1., you just need to open the phone's browser and look one a website in that language.
Check if the characters are shown or if you only see [] or just nothing.
To test 2., you need to check the android source code or some official documentation.
BUT, there is something in between:
If you see the characters but it is still not an official locale you can do the following:
Add resources for your language anyway: res/values-whatever and allow the user to choose the custom locale in the app's settings.
If the user has chosen whatever you can set the locale in EVERY Activity before doing anything else.
Here you can find a large list of supported languages with the localisation code:
What is the list of supported languages/locales on Android?
Below is an Android tutorial for supporting different languages in android app....
http://developer.android.com/training/basics/supporting-devices/languages.html
Hope this will help you.
Android 4.4+ has full Myanmar support including fonts. Informative article at http://viss.wordpress.com/2013/11/16/the-state-of-burmese-unicode/
Related
I have problem with displaying Khmer Unicode in most of Android project. What I want to display is អ៊ីមែល but the result return with unexpected value.
I also try with custom font in Khmer and support encoding as utf-8 but it still return the same result.
I'm not sure it is because of font or Android not support Khmer Unicode very well for now.
Any help anyone?
Likely link to font face that you are using, are you using. Here are some example, are you using Nokora, right?
And I could see also for Google web font, the written is the same:
So please check the correct font face before using, even in Noto google font face also, some are correct, some not correct too for that written.
More specifically if the font is missing the glyphs for a languages characters(double byte characters, etc) does Android default to another font or does it just show the SBOD(square box of death) symbol in place of the character?
I'm also curious how people handle font internationalization when using custom fonts.
I am not sure but I guess the app needs to handle it.Many apps place images of the symbol when its not supported by the font.Google recently launched Noto-https://www.google.com/get/noto/ which is supposed to support most of the languages.
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 want to know that how good is android when supporting non-english characters? Is it possible to embed fonts in my app and make the app to use that font?
The system fonts already support Unicode language very well (as well as Eclipse, but you will have to select new encoding when saving, Eclipse will confirm this).
You can embed your fonts as well. Look at this tutorial and this discusstion.
More information: I'm working on Vietnamese. The system is perfect for Vietnamese, and I think it is for other languages, too.
FYI the emulator with android 2.3.3 support hebrew characters.
But you can use your own fonts if you want.
Place them in the res/assets folder, then
TextView txt = (TextView) findViewById(R.id.custom_font);
Typeface font = Typeface.createFromAsset(getAssets(), "my_font.ttf");
txt.setTypeface(font);
I'm a developer for a japanese company and i've hadno problems with japanese characters even on devices set for english. However, if you want to use custom fonts, use vvieux's code :)
how to show hindi characters in android ,i have simple webview apllication ,it loads the url of some site which contains hindi characters ,but its showing [][][][ at place of those characters ,even the default android browser shows the same (not showing the hindi characters) the android version is 2.1, text encoding is set on unicode(UTF-8) in default android browser .,is there is any way to get the support for hindi characters
i hope my question is clear ,
Its the font-support
The Characters other than the most Basic ones, are not there in the TTF Font Files - Namely, DroidSans and DroidSansFallback
Any system needs to have the font on it to display the same.
In case of web pages, you can provide the font to the client to download and use
But in case of Android, its supposed to load characters only from DroidSans.ttf and DroidSansFallback.ttf
So if you want to view something in Hindi, these font files ( in system/fonts ) must support your characters
Your Options...
DroidSans.ttf is limited so you can't edit that. Download any font that has Hindi Character support and name it to DroidSans.ttf and replace in system/fonts.
- This will mess your default font
Download a TTF font that has Hindi Characters and Name it to DroidSansFallback.ttf and replace in system/fonts.
- This won't mess up anything & is a Better Option
Create a font using Font Designing Softwares and ADD as many characters as you wish (including HINDI) and follow the latter part of statement 2.
- The BEST Option !!
Use a Browser that has its own support for Hindi Fonts.
- Simplest option for people without ROOT *
* - Root implies Rooting of Android Device - Rooting Android
With Opera Mini browser, now you can read Indian language content on mobile phones which don't have built in unicode fonts. For this we need to turn
on the bitmap fonts in 'opera mini'
Type 'about: config' in mini address bar. This opens configuration settings.
There is a option for use bitmap fonts. Change that to Yes.
There is no way (not yet) to show any of the Indian characters of Indian languages on Android. It simply is not supported. See the following links for further information:
Link 1
Link2
It existed as a feature request, at least until 2.2. I am not sure if language support has been added for Hindi and other Indian languages from Android 2.3 and 3.0 onwards.
On a side note, does the same website work properly when you open it with a normal web browser?
Hindi is not supported in most devices.
But you still can browse Hindi websites using the app, SETT Hindi Browser if your Android version is above 2.2. It's an exclusive browser for Hindi & it displays Hindi in any device.
Here is the link: https://market.android.com/details?id=lk.bhasha.sett.hindi
Here is how it displays Hindi:
Me also struggled with this for one day but finally found a solution.
Just add these two lines of code it will work
WebSettings webSettings = webView.getSettings();
webSettings.setDefaultTextEncodingName("utf-8");