project_files/HedgewarsMobile/Classes/SingleWeaponViewController.m
changeset 6657 e1125559359f
parent 6209 074ab6ebcb3e
child 6670 d57fa21781ea
equal deleted inserted replaced
6656:6aeaba3ee584 6657:e1125559359f
    32 #pragma mark -
    32 #pragma mark -
    33 #pragma mark View lifecycle
    33 #pragma mark View lifecycle
    34 -(void) viewDidLoad {
    34 -(void) viewDidLoad {
    35     [super viewDidLoad];
    35     [super viewDidLoad];
    36     
    36     
    37     NSString *trFilePath = [NSString stringWithFormat:@"%@/en.txt",LOCALE_DIRECTORY()];
    37     NSString *trFilePath = [NSString stringWithFormat:@"%@/%@.txt",LOCALE_DIRECTORY(),[[NSLocale preferredLanguages] objectAtIndex:0]];
    38     // fill the data structure that we are going to read
    38     // fill the data structure that we are going to read
    39     LoadLocaleWrapper([trFilePath UTF8String]);
    39     LoadLocaleWrapper([trFilePath UTF8String]);
    40     
    40     
    41     quantity = (char *)malloc(sizeof(char)*(HW_getNumberOfWeapons()+1));
    41     quantity = (char *)malloc(sizeof(char)*(HW_getNumberOfWeapons()+1));
    42     probability = (char *)malloc(sizeof(char)*(HW_getNumberOfWeapons()+1));
    42     probability = (char *)malloc(sizeof(char)*(HW_getNumberOfWeapons()+1));