equal
deleted
inserted
replaced
35 #pragma mark View lifecycle |
35 #pragma mark View lifecycle |
36 -(void) viewDidLoad { |
36 -(void) viewDidLoad { |
37 [super viewDidLoad]; |
37 [super viewDidLoad]; |
38 |
38 |
39 self.trPath = [NSString stringWithFormat:@"%@", LOCALE_DIRECTORY()]; |
39 self.trPath = [NSString stringWithFormat:@"%@", LOCALE_DIRECTORY()]; |
40 self.trFileName = [NSString stringWithFormat:@"%@.txt", [[NSLocale preferredLanguages] firstObject]]; |
40 NSString *firstLanguage = [[NSLocale preferredLanguages] firstObject]; |
|
41 NSString *language = [[firstLanguage componentsSeparatedByString:@"-"] firstObject]; |
|
42 self.trFileName = [NSString stringWithFormat:@"%@.txt", language]; |
41 // fill the data structure that we are going to read |
43 // fill the data structure that we are going to read |
42 LoadLocaleWrapper([self.trPath UTF8String], [self.trFileName UTF8String]); |
44 LoadLocaleWrapper([self.trPath UTF8String], [self.trFileName UTF8String]); |
43 |
45 |
44 quantity = (char *)malloc(sizeof(char)*(HW_getNumberOfWeapons()+1)); |
46 quantity = (char *)malloc(sizeof(char)*(HW_getNumberOfWeapons()+1)); |
45 probability = (char *)malloc(sizeof(char)*(HW_getNumberOfWeapons()+1)); |
47 probability = (char *)malloc(sizeof(char)*(HW_getNumberOfWeapons()+1)); |