Forum Xamarin.iOS
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

How to configure and what to expect from a single non-English language app?

I'm trying to wrap my head around language support in Xamarin apps for iOS and I must admit I'm very confused. Let's say I wanted to make an app that only works in Arabic. I don't want to localize (yet) the app. I just want to run it in a non-English locale, and see what I can expect from System.Globalization.CultureInfo.CurrentCulture/CurrentUICulture.

I added this to my info.plist:


I did not add any CFBundleLocalizations. I made sure the device had Arabic installed, though I left English as the default language. Running the app, the culture is still en-US.

I read somewhere about adding stuff in the Main, so I added this before the call to UIApplication.Main:

NSUserDefaults.StandardUserDefaults.SetValueForKey(NSArray.FromStrings("ar"), new NSString("AppleLanguages"));

Still no luck with the culture.

a) How should I have configured my app
b) What can I expect from CultureInfo?
c) Do I have to force one particular CultureInfo? Then what if the app is localized, how will I know what is the current culture? Imagine my app was in English and Arabic, running on a device where French was the default language. How will the app know which of English or Arabic had priority in the user's settings?


Sign In or Register to comment.