project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m
changeset 6527 d19c6af9fa48
parent 6415 af2047bb4f70
child 6612 8fd6bb239a1e
--- a/project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m	Sun Dec 11 23:20:59 2011 +0100
+++ b/project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m	Mon Dec 12 00:10:11 2011 +0100
@@ -120,7 +120,7 @@
     NSInteger enginePort = self.proto.enginePort;
     CGFloat screenScale = [[UIScreen mainScreen] safeScale];
     NSString *ipcString = [[NSString alloc] initWithFormat:@"%d",enginePort];
-    NSString *localeString = [[NSString alloc] initWithFormat:@"%@.txt",[[NSLocale currentLocale] objectForKey:NSLocaleLanguageCode]];
+    NSString *localeString = [[NSString alloc] initWithFormat:@"%@.txt",[[NSLocale preferredLanguages] objectAtIndex:0]];
     NSUserDefaults *settings = [NSUserDefaults standardUserDefaults];
 
     if (IS_DUALHEAD()) {
@@ -163,7 +163,7 @@
     gameArgs[ 1] = [horizontalSize UTF8String];                                                 //cScreenWidth
     gameArgs[ 2] = [verticalSize UTF8String];                                                   //cScreenHeight
     gameArgs[ 3] = [[NSString stringWithFormat:@"%d",tmpQuality] UTF8String];                   //quality
-    gameArgs[ 4] = "en.txt";//[localeString UTF8String];                                        //cLocaleFName
+    gameArgs[ 4] = [localeString UTF8String];                                                   //cLocaleFName
     gameArgs[ 5] = [username UTF8String];                                                       //UserNick
     gameArgs[ 6] = [[[settings objectForKey:@"sound"] stringValue] UTF8String];                 //isSoundEnabled
     gameArgs[ 7] = [[[settings objectForKey:@"music"] stringValue] UTF8String];                 //isMusicEnabled