project_files/HedgewarsMobile/Classes/MapConfigViewController.m
branchios-revival
changeset 11230 628ac6f8a41e
parent 11210 2e80c9861818
child 11559 73e6a3d2f768
--- a/project_files/HedgewarsMobile/Classes/MapConfigViewController.m	Thu Oct 22 00:46:45 2015 +0200
+++ b/project_files/HedgewarsMobile/Classes/MapConfigViewController.m	Thu Oct 22 03:00:22 2015 +0200
@@ -352,6 +352,15 @@
     oldPage = newPage;
 }
 
+- (void)localizeSegmentedControl
+{
+    for (NSUInteger i = 0; i < self.segmentedControl.numberOfSegments; i++)
+    {
+        NSString *oldTitle = [self.segmentedControl titleForSegmentAtIndex:i];
+        [self.segmentedControl setTitle:NSLocalizedString(oldTitle, nil) forSegmentAtIndex:i];
+    }
+}
+
 #pragma mark -
 #pragma mark view management
 -(NSArray *) dataSourceArray {
@@ -403,7 +412,9 @@
 
 -(void) viewDidLoad {
     [super viewDidLoad];
-
+    
+    [self localizeSegmentedControl];
+    
     // initialize some "default" values
     self.slider.value = 0.05f;
     self.slider.enabled = NO;