GUI for chinese fonts messed up in Android - android

I have an android application which is in english language and the user has the option to switch to chinese language depending on the language of the their phone. The GUI when using english language is okay, but when I switch it to chinese, the GUI gets messed up. Any idea how to have a proper GUI layout when utilizing chinese characters?

Try using values-zh, raw-zh folders for your text. Font files don't work always. You can use google translate to get the chinese translation of your text and can tweak it if you come across any wrong translation by google.

ACII is messing it up, try Unicode-Encoding. Unicode supports nearly every sign on the world, but keep in mind an ASCII char is 1 Byte, an Unicode takes 2 Bytes!

Related

Windows Microsoft Word - Android style multilingual predictive text

I was wondering if it's possible to have android style multilingual predictive text in Windows (to be used with Microsoft Word, for example)? I'm learning Turkish and I have English and Turkish languages enabled on my phone. I can type in both English and Turkish without changing my keyboard/input at all - it just detects what I'm trying to type and replaces, or gives me the option to replace, the word with the correct one including Turkish specific letters.
Windows is comparatively clunky and awkward to use, typing in both languages and correcting mistakes is fiddly and annoying. I've tried some settings that I've found in regards to prediction and proofing etc. but none come remotely close to replicating the android style predictive text.

Display Japanese-style Chinese letters instead of Chinese-style Chinese letters when the system language is English

My question is similar to this (Displaying japanese instead of chinese in a textview), but a little bit different. The proposed solution is embedding a Japanese font in the app.
But I would not like to embed a Japanese font in the app, because it will increase the app size and I would have to buy an expensive font licence. It seems the Android emulator (Android 8.1) already has a Japanese font. How to use it, instead of embedding a font?
I mean, when I changed the system language to Japanese, it was like this:
But when the system language is English, it was like this (notice the third and fourth letters):
In case if you are wondering why I want to display them in Japanese style, I want to make a Japanese learning app, so it must display Japanese-style Chinese letters no matter what the system language is.
Since API 17 you can use TextView.setTextLocale
kanji.setTextLocale(Locale.JAPAN);

How to replace (keyboard and TTS) languages in the App Inventor 2's Emulator?

I want to test a button that will allow user to type in Hebrew and get TTS to say that text.
I don't have an android device, so am using the Emulator.
I defined the following:
and
But in the Emulator, Hebrew is not defined in either home/menu/settings/language & keyboard/ or home/menu/settings/text-to-speech/language.
How can I replace some of the (useless for me) languages in the Emulator with other languages (both for keyboards and TTS)?
#Taifun comments to my OP constitute the answer to the OP, and following his URLs, I tried to implement Hebrew speech in an ai2 script.
However, seems there's a particular problem with Hebrew speech, as nothing is heard for an Hebrew sentence (while the same configuration produced English speech without a problem, viz. Can Hebrew be used with TextToSpeech and YandexTranslate?)

Numbers wrongly shown right to left anywhere

I'm having a problem with my Huawei y600 Android phone in stock rom. The problem is with numbers. They are shown correctly when language is English (left to right), but when I change the language to Farsi (right to left; My native Language) the numbers go right to left too and thats a totall wrong!
This is the screenshot when the phone is in English:
The clock is in the correct format, it shows 18:45. numbers are correct in contacts too:
But when language changes clock goes freaky:
The clock was 18:56. it shows(in my language) "8164:" note that the ":" mark will go at the end too...and 18 46 will go 81 64. They go right to left same as the texts..but thats wrong... it's worse when in contacts (It's the Same Number):
As you See The 09113924601 Is 4601 392 0911. they all go right to left.
I just tested my phone more an i founded out that this problem is only whit persian not any other right to left language(like arabic),so i think if there is an app or an adb command to make the rom uses arabic numbers while using persian words i think the problem will be fixed cuz arabic and persian numbers are the same.
i tried more locale 2 and i mixed the arabic and persian in ways like arabic in language and iran in country and reverse but didnt worked.
1_is there a program to specify the parameters more accurately like numbers seprate and words seprate?
2_what is "variant" in more locale 2 app?
This seems like a bug in the software implementation of certain stock programs on the device. They most likely haven't been tested correctly in Farsi, yet still make some basic use of language translation features (albeit incorrectly).
I suggest downloading some separate programs from an app store (e.g. Google Play) to replace the stock programs that don't work correctly for you... so find a new launcher program, and a new contacts program.

Dipaly farsi text in android webview (for phones not supporting farsi)

In farsi letters are attach together to form writing scripts. However when I save HTML pages using "UTF-8" or "Windows-1256" encdoings, and try to display them using webview in android, letters are diplayed seperately and in left-to-right direction (instead of RTL).
I should notice that this case is not happening in phones supporting farsi.
Correct form should be like this (snapshot from phone supporting farsi):
Bad-formed text happens in phones not supporing farsi (Persian):
It should be noticed i've used persian font in both cases.
I also see some solutions for normal Strings in java which changes character on by one in this
question
My question: Can i fix this cases (or it should be fix by phone vendors)? if possible what is solution?
I hit this bug a lot when I was doing keyboards. The problem is that the build in canvas.drawText function in Android didn't support RTL languages. There was a patch for it, but it wasn't part of the default build of Android. So only models going out to those parts of the world that used it tended to have it. Unfortunately I know of no way to test whether it has the patch. And if it doesn't, there's no way to fix it. You could try reversing the text, but then you'd break devices which did have the patch.
Long story short- there is no way to fix it. However, I'd be shocked if Google hasn't picked up the patch in mainline by now (it existed back in the 2.2 days), so its a shrinking number of phones effected.
You can try making html with reverse font sequence! just write a windows app to get font and deliver reverse one, and use it in your android device

Categories

Resources