# HG changeset patch # User koda # Date 1323645011 -3600 # Node ID d19c6af9fa48ddf285fed77e48721e2eb695757f # Parent 6ed9d2acf1a542b0f6df62d6a441c649dd9a8562 finally hook the engine localization on ios diff -r 6ed9d2acf1a5 -r d19c6af9fa48 project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m --- 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