NativeScript set autocorrection language - android

I am developing a NativeScript chat app in JavaScript for Android.
It will be used on italian devices, and I need to enable keyboard autocorrect for this language only.
The issue:
while the device language is set to English, autocorrect works, but it doesn't in Italian.
<TextField id="messageBox" hint="Scrivi un messaggio..." class="msg-input"
autocorrect="true" text="{{ testoMessaggio }}" ></TextField>
Since I am new to both NativeScript and Android development, I'm probably missing some basic knowledge about device locale language. Still, searching around I couldn't find any answer.
How can I fix this?

I don't think that is possible with Android itself. You may either turn it off or on but can not restrict what should appear in suggestions.

There is no such method available with EditText (Native Android component that NativeScript uses to wrap as TextField) however I think you need to provide special instruction with your app. Normally, each time you switch language, the spellcheck dictionary changes as well. However, If that language dictionary available, user might need to download it.
Settings -> Language & Input -> Add-on Dictionaries
Also to note here that if user has disabled the predictive text, app may not have permission to active that.
Check that your languages are selected in 'Languages in types'
Make sure that the "Predictive" option is activated.
Make sure that the "Auto replacement" option is activated.

Turns out it's an issue with one of the debugging devices, a Oneplus One, Lineage OS 15.1. Same problem occurs with different NativeScript apps.
Autocorrection works well on other devices and emulators.

Related

RTL not Support after removing app from recent (killing)

I am working on multi language application which contain Arabic language. I applied locale at 2 places
When change language
In the Splash Screen
At the first time when I change language and restart the application. Its working fine
When I kill the application but pressing back button and launch application again. Its also working fine.
But When I remove application from recent and launch the application, RTL not supported.
Any idea about this issue ? Please help me.
I think RTL and applied local not worked properly after removing application from recent.
Maybe you did not catch the current language so when app load again load a default
language
when lanch app again print language to know which language you init app
After doing lots of R&D I found this. Tried this and issue has been resolved

Keep showing res/values-zh/strings.xml instead of res/values-en even when my phone's locale is English

Have an issue that my application keep showing res/values-zh/strings.xml instead of res/values-en even when my phone's locale is English or any other undefined locale(language).
Here is my main activity java class and it is showing English but we get the result on phone in Chinese
Here is default values strings
Would be much appreciated if someone have any idea on this issue as i had following the android studio documentation and the localization is not working properly and i could not find out the reason for quite long time. Kindly let me know if further info needed, thanks !
What version of Android do you use?
Is it Android N? Android N allows the user to configure a list of languages. If the first language is not supported, and the second is Chinese, then you will get Chinese UI (if Chinese strings are available, of course)

How to add or\and edit translation files for an android system Rom?

I am in Israel, using the Hebrew language, and I purchase phones from the USA.
Recently Samsung decided not to show all language, but just the region important ones, in order to block imports from other countries I suppose.
I am new to android development, but I would like to know how to add or\and edit a System translation file, in order to maybe change a custom or stock Rom and have Hebrew language.
Thanks!

Change language on Facebook SDK for Android

I'm currently using the Facebook SDK for Android to post messages onto your facebook wall from within my mobile application. All Facebook views are now by default displayed in French, but I want them to be in Dutch. I think this is because Facebook detects I'm living in Belgium, and wrongly sets the language to French. The language setting on my Dalvik VM, however, is Dutch.
Can anyone help me out?
I found a solution. My DALVIK VM language setting was set to "Dutch (Belgium)", but setting it to "Dutch (Netherlands)" solved the problem. It's a dirty, but apparently effective solution.

Testing internationalisations / translations

Is there a way to easily test out my translations for an Android app on a developer phone, if your phone's Settings->Languages menu doesn't have those? For example, to test translations for a desktop Linux application, I can run it like so:
LANG=de_DE.UTF-8 ./myapp
Is there a similar setting or trigger to do this for an Android app?
There's a lot of good information at http://developer.android.com/guide/topics/resources/localization.html
Bottom line: If your developer phone doesn't support the locale you want to test, it's not worth the effort to make it work. Instead, do your testing on an emulator.
The emulator has a large selection of built-in locales. If you can't find the one you want in there, look for an application called "Custom Locale" installed in the emulator.
Run "Custom Locale", and define the locale you want to use. It's really quite easy.

Categories

Resources