small ios weapon localisation handling fix
authorkoda
Thu, 09 Feb 2012 18:09:03 +0100
changeset 6657 e1125559359f
parent 6656 6aeaba3ee584
child 6658 2cccf6b2b89d
small ios weapon localisation handling fix
hedgewars/uLocale.pas
project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m
--- a/hedgewars/uLocale.pas	Thu Feb 09 17:28:05 2012 +0100
+++ b/hedgewars/uLocale.pas	Thu Feb 09 18:09:03 2012 +0100
@@ -96,7 +96,7 @@
            end;
        end;
    Close(f);
-   WriteLnToConsole('Locale loaded "' + FileName + '"');
+   {$IFNDEF IPHONEOS}WriteLnToConsole('Locale loaded "' + FileName + '"');{$ENDIF}
    end;
 {$I+}
 end;
--- a/project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m	Thu Feb 09 17:28:05 2012 +0100
+++ b/project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m	Thu Feb 09 18:09:03 2012 +0100
@@ -34,7 +34,7 @@
 -(void) viewDidLoad {
     [super viewDidLoad];
     
-    NSString *trFilePath = [NSString stringWithFormat:@"%@/en.txt",LOCALE_DIRECTORY()];
+    NSString *trFilePath = [NSString stringWithFormat:@"%@/%@.txt",LOCALE_DIRECTORY(),[[NSLocale preferredLanguages] objectAtIndex:0]];
     // fill the data structure that we are going to read
     LoadLocaleWrapper([trFilePath UTF8String]);