For Xamarin.Forms localization, do I need to implement ILocalize? - android

In Xamarin help page https://learn.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/localization/text?tabs=windows, for "Displaying the Correct Language", it suggests to define interface ILocalize then use DependencyService to get some locale info.
However, My Xamarin.Forms Android app could just pick the right language resource file according to the locale settings of the device, and display rightful language.
So translations are working fine without ILocalize and the implementations. Do I really need ILocalize and the implementations?

No need of DependencyService, Xamarin.Forms automatically recognizes it and gets the appropriate resource file. Docs needs to be updated, an issue was opened for the same

Related

Using Android App Bundle how do i get the system to download a new language when the system language is changed

I am migrating my app to use Android App Bundle publishing format.
I'm using Internal app sharing to test this change.
While installing the app for the first time I can see that the app is installed with all the languages I have added to the System languages menu.
incase I add a new System language that wasn't added before the installation of the app, how do I make Android download the new language strings?
As you can see here - https://www.youtube.com/watch?v=0raqVydJmNE&t=789s
It should get downloaded automatically.
But after i add a new language and go into my app the Locale is changed to the new language but my resources are still the language from before the switch.
I know I can use Core API to download languages in the code but I want the app to startup with the correct language not change language in the middle of the user's usage.
Is there anything I'm missing? do in seed to configure something else in gradle?
Thanks in advance.
It can take a little while (usually around 24 hours) for the Play Store to catch up with the language change. If you're okay with that delay, then you don't need to do anything.
Otherwise you can use the code provided in the official sample to guide you in your own implementation.

Android wrong locale resolution for ES-EC language

I have the next localization in my app:
values
values-es
values-es-rMX
When I have locale of the device set to es_EC (Ecuador), I see strings from MX folder!
But accordingly to this tutorial, I should see strings from base ES folder (actually, this is the goal).
Why is it happening and how can I get correct app behavior?
I'm using an emulator with API level 28.
Okay, the answer is on another StackOverflow question, the reason is the same, this is intended behavior for Android system.

Is it possible to disable android studio generating its own files?

I wanted to know if its possible to disable the files android studio generates for example
"value v11" and more and also value's with translated strings and android's useless drawable and strings I didn't put in.
Those files are required. There is no way to disable that. And without them your app wont function properly (on all devices and api levels).

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 re-build the default "Launcher" application?

My goal is to modify the Launcher application and dynamically modify and change the theme.
I saw several 'home' apps at http://www.cyrket.com/p/android/com.stain46.taghome/. It looks like they took the default Home(Launcher) and modified it. How did they do that? What do I need to modify to achieve the same thing?
I have done this with the ICS launcher. You also need to do quite a number of code changes to get it to compile as a normal app because it uses a lot of private internal APIs (despite what Google may have implied). You also need to change the package name. There are two limitations I've found:
There's a filter called TableMaskFilter that isn't available to normal apps. I think this allows the app drawer to be semi-transparent, but I removed uses of it and it looks fine I think.
More critically, it appears there is no way to replicate the widget-adding experience because it requires a permission that only system apps can have. See this question.
Anyway, I put my source here. It compiles and works on the official Galaxy S2 4.0.3, but if you try to add widgets it will crash.
Note, when you're changing the package name, there are places that Eclipse's refactor doesn't notice (e.g. XML layouts). I recommend you do a global text search/replace instead.
The standard Launcher is open source so you can definitely grab it and modify it the way you want. For your app to be used as the Home Screen you will need to specify the correct Intent filter in your AndroidManifest.xml and the user will have to choose your app when they press the Home button. Why don't you grab that code, play with it and come back when you have more questions and more of an idea of what you want to change.
Here i found one stable version Launcher2
I have sharing that GitHub repo. HERE
WIKI of this project :
This project contains the code for the Launcher app that ships with Android Jelly Bean (API 16).
Some minor changes were required from this source code to remove the use of private APIs. These changes have been marked by "// AOSP Change"

Categories

Resources