Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting default language

Tags:

xamarin.ios

I would like to see default button captions in my native language ,

Even I changed iPad's language to another lang. my app still shows English ones...Edit,Done,Save etc.

I also set CFBundleDevelopmentRegion as a User-Defined variable in XCode but not helped !

Can you help ?

like image 831
Davut Gürbüz Avatar asked Mar 31 '13 11:03

Davut Gürbüz


2 Answers

You should make these things:

  • Add your native language to app's supported Localization array of languages; how it looks like in app settings

  • Make your Application.Main procedure looks like:

    static void Main (string[] args)
    {
        // if you want to use a different Application Delegate class from "AppDelegate"
        // you can specify it here.
        NSUserDefaults.StandardUserDefaults.SetValueForKey(NSArray.FromStrings("tr"), new NSString("AppleLanguages"));
        NSUserDefaults.StandardUserDefaults.Synchronize();
        UIApplication.Main (args, null, "AppDelegate");
    }

Then, this

enter image description here

turns to this

enter image description here

(I suggested that your language is turkish.)

like image 119
Maxim Korobov Avatar answered Oct 18 '22 21:10

Maxim Korobov


For monotouch I think it is different, They hide some langs for reducing the size of IPA.

http://docs.xamarin.com/guides/ios/advanced_topics/localization_and_internationalization

like image 34
Davut Gürbüz Avatar answered Oct 18 '22 19:10

Davut Gürbüz