I have a Xamarin forms (v5.0.0.1558pre3) android Application on Visual Studio 2019 I want my App to support different languages so I did the following:
I have set the language on the device to Hebrew.
I then set all strings to use the resources:
Text="{x:Static resources:AppResources.MonthlyUsage}"
When I launch the application, it still loads the default AppResources.resx values.
Other languages (like fr-FR) are being set just fine.
I think on Android you will need to check the currently set Android locale like so:
var locale = Java.Util.Locale.Default;
There is a thread on the Xamarin Forums describing a similar issue: https://forums.xamarin.com/discussion/74484/app-crashes-when-language-set-to-hebrew
It seems like you will also have to replace _
with -
and also seems like iw_IL
needs to be changed to he_IL
.
You will have to detect this on startup and adjust the CurrentUICulture accordingly.