├── .gitignore ├── LICENCE.md ├── Localisator ├── Localisator.h ├── Localisator.m └── Localisator.swift ├── Localisator_Demo-objC ├── Localisator_Demo-objC.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── Localisator_Demo-objC.xccheckout │ └── xcuserdata │ │ └── mazevedo.xcuserdatad │ │ └── xcschemes │ │ ├── Localisator_Demo-objC.xcscheme │ │ └── xcschememanagement.plist ├── Localisator_Demo-objC │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── DeviceLanguage.imageset │ │ │ ├── Contents.json │ │ │ └── DeviceLanguage.png │ │ ├── English_en.imageset │ │ │ ├── Contents.json │ │ │ └── English.png │ │ └── French_fr.imageset │ │ │ ├── Contents.json │ │ │ └── French.png │ ├── Info.plist │ ├── LaunchScreen.xib │ ├── LocalisatorViewController.h │ ├── LocalisatorViewController.m │ ├── Main.storyboard │ ├── ViewController.h │ ├── ViewController.m │ ├── en.lproj │ │ └── Localizable.strings │ ├── fr.lproj │ │ └── Localizable.strings │ └── main.m └── Localisator_Demo-objCTests │ ├── Info.plist │ └── Localisator_Demo_objCTests.m ├── Localisator_Demo-swift ├── Localisator_Demo-swift.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── Localisator_Demo-swift.xccheckout │ └── xcuserdata │ │ └── mazevedo.xcuserdatad │ │ └── xcschemes │ │ ├── Localisator_Demo-swift.xcscheme │ │ └── xcschememanagement.plist ├── Localisator_Demo-swift │ ├── AppDelegate.swift │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── DeviceLanguage.imageset │ │ │ ├── Contents.json │ │ │ └── DeviceLanguage.png │ │ ├── English_en.imageset │ │ │ ├── Contents.json │ │ │ └── English.png │ │ └── French_fr.imageset │ │ │ ├── Contents.json │ │ │ └── French.png │ ├── Info.plist │ ├── LaunchScreen.xib │ ├── LocalisatorViewController.swift │ ├── Main.storyboard │ ├── ViewController.swift │ ├── en.lproj │ │ └── Localizable.strings │ └── fr.lproj │ │ └── Localizable.strings └── Localisator_Demo-swiftTests │ ├── Info.plist │ └── Localisator_Demo_swiftTests.swift ├── README.md ├── Screenshots ├── Screenshot1.png └── Screenshot2.png └── iOS-CustomLocalisator.podspec /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | CustomLocalisator.xcodeproj/project.xcworkspace/xcuserdata/mazevedo.xcuserdatad/UserInterfaceState.xcuserstate 3 | 4 | *.xcuserstate 5 | 6 | CustomLocalisator.xcodeproj/project.xcworkspace/xcuserdata/mazevedo.xcuserdatad/UserInterfaceState.xcuserstate 7 | 8 | *.xcbkptlist 9 | 10 | CustomLocalisator.xcodeproj/xcuserdata/mazevedo.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist 11 | -------------------------------------------------------------------------------- /LICENCE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Michaël Azevedo 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /Localisator/Localisator.h: -------------------------------------------------------------------------------- 1 | // 2 | // Localisator.h 3 | // CustomLocalisator 4 | // 5 | // Created by Michael Azevedo on 05/03/2014. 6 | // 7 | 8 | #import 9 | 10 | #define LOCALIZATION(text) [[Localisator sharedInstance] localizedStringForKey:(text)] 11 | 12 | static NSString * const kNotificationLanguageChanged = @"kNotificationLanguageChanged"; 13 | 14 | 15 | 16 | @interface Localisator : NSObject 17 | 18 | @property (nonatomic, readonly) NSArray* availableLanguagesArray; 19 | @property (nonatomic, assign) BOOL saveInUserDefaults; 20 | @property NSString * currentLanguage; 21 | 22 | + (Localisator*)sharedInstance; 23 | -(NSString *)localizedStringForKey:(NSString*)key; 24 | -(BOOL)setLanguage:(NSString*)newLanguage; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /Localisator/Localisator.m: -------------------------------------------------------------------------------- 1 | // 2 | // Localisator.m 3 | // CustomLocalisator 4 | // 5 | // Created by Michael Azevedo on 05/03/2014. 6 | // 7 | 8 | #import "Localisator.h" 9 | 10 | static NSString * const kSaveLanguageDefaultKey = @"kSaveLanguageDefaultKey"; 11 | 12 | 13 | @interface Localisator() 14 | 15 | @property NSDictionary * dicoLocalisation; 16 | @property NSUserDefaults * defaults; 17 | 18 | @end 19 | 20 | @implementation Localisator 21 | 22 | 23 | #pragma mark - Singleton Method 24 | 25 | + (Localisator*)sharedInstance 26 | { 27 | static Localisator *_sharedInstance = nil; 28 | 29 | static dispatch_once_t oncePredicate; 30 | 31 | dispatch_once(&oncePredicate, ^{ 32 | _sharedInstance = [[Localisator alloc] init]; 33 | }); 34 | return _sharedInstance; 35 | } 36 | 37 | 38 | #pragma mark - Init methods 39 | 40 | - (id)init 41 | { 42 | self = [super init]; 43 | if (self) 44 | { 45 | _defaults = [NSUserDefaults standardUserDefaults]; 46 | _availableLanguagesArray = @[@"DeviceLanguage", @"English_en", @"French_fr"]; 47 | _dicoLocalisation = nil; 48 | 49 | _currentLanguage = @"DeviceLanguage"; 50 | 51 | NSString * languageSaved = [_defaults objectForKey:kSaveLanguageDefaultKey]; 52 | 53 | if (languageSaved != nil && ![languageSaved isEqualToString:@"DeviceLanguage"]) 54 | { 55 | [self loadDictionaryForLanguage:languageSaved]; 56 | } 57 | } 58 | return self; 59 | } 60 | 61 | 62 | #pragma mark - saveInIUserDefaults custom accesser/setter 63 | 64 | -(BOOL)saveInUserDefaults 65 | { 66 | return ([self.defaults objectForKey:kSaveLanguageDefaultKey] != nil); 67 | } 68 | 69 | -(void)setSaveInUserDefaults:(BOOL)saveInUserDefaults 70 | { 71 | if (saveInUserDefaults) 72 | { 73 | [self.defaults setObject:_currentLanguage forKey:kSaveLanguageDefaultKey]; 74 | } 75 | else 76 | { 77 | [self.defaults removeObjectForKey:kSaveLanguageDefaultKey]; 78 | } 79 | [self.defaults synchronize]; 80 | } 81 | 82 | #pragma mark - Private Instance methods 83 | 84 | -(BOOL)loadDictionaryForLanguage:(NSString *)newLanguage 85 | { 86 | NSArray * arrayExt = [newLanguage componentsSeparatedByString:@"_"]; 87 | 88 | __block BOOL languageFound = NO; 89 | 90 | [arrayExt enumerateObjectsUsingBlock:^(NSString * obj, NSUInteger idx, BOOL *stop) { 91 | 92 | NSURL * urlPath = [[NSBundle bundleForClass:[self class]] URLForResource:@"Localizable" withExtension:@"strings" subdirectory:nil localization:obj]; 93 | 94 | if ([[NSFileManager defaultManager] fileExistsAtPath:urlPath.path]) 95 | { 96 | self.currentLanguage = [newLanguage copy]; 97 | self.dicoLocalisation = [[NSDictionary dictionaryWithContentsOfFile:urlPath.path] copy]; 98 | 99 | languageFound = YES; 100 | *stop = YES; 101 | } 102 | }]; 103 | 104 | return languageFound; 105 | } 106 | 107 | 108 | #pragma mark - Public Instance methods 109 | 110 | -(NSString *)localizedStringForKey:(NSString*)key 111 | { 112 | if (self.dicoLocalisation == nil) 113 | { 114 | return NSLocalizedString(key, key); 115 | } 116 | else 117 | { 118 | NSString * localizedString = self.dicoLocalisation[key]; 119 | if (localizedString == nil) 120 | localizedString = key; 121 | return localizedString; 122 | } 123 | } 124 | 125 | -(BOOL)setLanguage:(NSString *)newLanguage 126 | { 127 | if (newLanguage == nil || [newLanguage isEqualToString:self.currentLanguage] || ![self.availableLanguagesArray containsObject:newLanguage]) 128 | return NO; 129 | 130 | if ([newLanguage isEqualToString:@"DeviceLanguage"]) 131 | { 132 | self.currentLanguage = [newLanguage copy]; 133 | self.dicoLocalisation = nil; 134 | [[NSNotificationCenter defaultCenter] postNotificationName:kNotificationLanguageChanged 135 | object:nil]; 136 | return YES; 137 | } 138 | else 139 | { 140 | BOOL isLoadingOk = [self loadDictionaryForLanguage:newLanguage]; 141 | 142 | if (isLoadingOk) 143 | { 144 | [[NSNotificationCenter defaultCenter] postNotificationName:kNotificationLanguageChanged 145 | object:nil]; 146 | if ([self saveInUserDefaults]) 147 | { 148 | [self.defaults setObject:_currentLanguage forKey:kSaveLanguageDefaultKey]; 149 | [self.defaults synchronize]; 150 | } 151 | } 152 | return isLoadingOk; 153 | } 154 | } 155 | 156 | 157 | @end 158 | -------------------------------------------------------------------------------- /Localisator/Localisator.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Localisator.swift 3 | // Localisator_Demo-swift 4 | // 5 | // Created by Michaël Azevedo on 10/02/2015. 6 | // Copyright (c) 2015 Michaël Azevedo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | let kNotificationLanguageChanged = NSNotification.Name(rawValue:"kNotificationLanguageChanged") 12 | 13 | func Localization(_ string:String) -> String{ 14 | return Localisator.sharedInstance.localizedStringForKey(string) 15 | } 16 | 17 | func SetLanguage(_ language:String) -> Bool { 18 | return Localisator.sharedInstance.setLanguage(language) 19 | } 20 | 21 | class Localisator { 22 | 23 | // MARK: - Private properties 24 | 25 | private let userDefaults = UserDefaults.standard 26 | private var availableLanguagesArray = ["DeviceLanguage", "English_en", "French_fr"] 27 | private var dicoLocalisation:NSDictionary! 28 | 29 | 30 | private let kSaveLanguageDefaultKey = "kSaveLanguageDefaultKey" 31 | 32 | // MARK: - Public properties 33 | 34 | var currentLanguage = "DeviceLanguage" 35 | 36 | // MARK: - Public computed properties 37 | 38 | var saveInUserDefaults:Bool { 39 | get { 40 | return (userDefaults.object(forKey: kSaveLanguageDefaultKey) != nil) 41 | } 42 | set { 43 | if newValue { 44 | userDefaults.set(currentLanguage, forKey: kSaveLanguageDefaultKey) 45 | } else { 46 | userDefaults.removeObject(forKey: kSaveLanguageDefaultKey) 47 | } 48 | userDefaults.synchronize() 49 | } 50 | } 51 | 52 | 53 | // MARK: - Singleton method 54 | 55 | class var sharedInstance :Localisator { 56 | struct Singleton { 57 | static let instance = Localisator() 58 | } 59 | return Singleton.instance 60 | } 61 | 62 | // MARK: - Init method 63 | init() { 64 | if let languageSaved = userDefaults.object(forKey: kSaveLanguageDefaultKey) as? String { 65 | if languageSaved != "DeviceLanguage" { 66 | _ = self.loadDictionaryForLanguage(languageSaved) 67 | } 68 | } 69 | } 70 | 71 | // MARK: - Public custom getter 72 | 73 | func getArrayAvailableLanguages() -> [String] { 74 | return availableLanguagesArray 75 | } 76 | 77 | 78 | // MARK: - Private instance methods 79 | 80 | fileprivate func loadDictionaryForLanguage(_ newLanguage:String) -> Bool { 81 | 82 | let arrayExt = newLanguage.components(separatedBy: "_") 83 | 84 | for ext in arrayExt { 85 | if let path = Bundle(for:object_getClass(self)).url(forResource: "Localizable", withExtension: "strings", subdirectory: nil, localization: ext)?.path { 86 | if FileManager.default.fileExists(atPath: path) { 87 | currentLanguage = newLanguage 88 | dicoLocalisation = NSDictionary(contentsOfFile: path) 89 | return true 90 | } 91 | } 92 | } 93 | return false 94 | } 95 | 96 | fileprivate func localizedStringForKey(_ key:String) -> String { 97 | 98 | if let dico = dicoLocalisation { 99 | if let localizedString = dico[key] as? String { 100 | return localizedString 101 | } else { 102 | return key 103 | } 104 | } else { 105 | return NSLocalizedString(key, comment: key) 106 | } 107 | } 108 | 109 | fileprivate func setLanguage(_ newLanguage:String) -> Bool { 110 | 111 | if (newLanguage == currentLanguage) || !availableLanguagesArray.contains(newLanguage) { 112 | return false 113 | } 114 | 115 | if newLanguage == "DeviceLanguage" { 116 | currentLanguage = newLanguage 117 | dicoLocalisation = nil 118 | userDefaults.removeObject(forKey: kSaveLanguageDefaultKey) 119 | NotificationCenter.default.post(name: kNotificationLanguageChanged, object: nil) 120 | return true 121 | } else if loadDictionaryForLanguage(newLanguage) { 122 | NotificationCenter.default.post(name: kNotificationLanguageChanged, object: nil) 123 | if saveInUserDefaults { 124 | userDefaults.set(currentLanguage, forKey: kSaveLanguageDefaultKey) 125 | userDefaults.synchronize() 126 | } 127 | return true 128 | } 129 | return false 130 | } 131 | } 132 | 133 | -------------------------------------------------------------------------------- /Localisator_Demo-objC/Localisator_Demo-objC.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 83C963AC1A89EE46008D5C6D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 83C963AB1A89EE46008D5C6D /* main.m */; }; 11 | 83C963AF1A89EE46008D5C6D /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 83C963AE1A89EE46008D5C6D /* AppDelegate.m */; }; 12 | 83C963B21A89EE46008D5C6D /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 83C963B11A89EE46008D5C6D /* ViewController.m */; }; 13 | 83C963B71A89EE46008D5C6D /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 83C963B61A89EE46008D5C6D /* Images.xcassets */; }; 14 | 83C963C61A89EE46008D5C6D /* Localisator_Demo_objCTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 83C963C51A89EE46008D5C6D /* Localisator_Demo_objCTests.m */; }; 15 | 83C963D21A89EEDB008D5C6D /* Localisator.m in Sources */ = {isa = PBXBuildFile; fileRef = 83C963D11A89EEDB008D5C6D /* Localisator.m */; }; 16 | 83C963D51A89EEE6008D5C6D /* LocalisatorViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 83C963D41A89EEE6008D5C6D /* LocalisatorViewController.m */; }; 17 | 83C963DE1A89F3D5008D5C6D /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 83C963DC1A89F2A1008D5C6D /* Localizable.strings */; }; 18 | 83C964231A8A0385008D5C6D /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 83C964211A8A0385008D5C6D /* LaunchScreen.xib */; }; 19 | 83C964241A8A0385008D5C6D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 83C964221A8A0385008D5C6D /* Main.storyboard */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXContainerItemProxy section */ 23 | 83C963C01A89EE46008D5C6D /* PBXContainerItemProxy */ = { 24 | isa = PBXContainerItemProxy; 25 | containerPortal = 83C9639E1A89EE46008D5C6D /* Project object */; 26 | proxyType = 1; 27 | remoteGlobalIDString = 83C963A51A89EE46008D5C6D; 28 | remoteInfo = "Localisator_Demo-objC"; 29 | }; 30 | /* End PBXContainerItemProxy section */ 31 | 32 | /* Begin PBXFileReference section */ 33 | 83C963A61A89EE46008D5C6D /* Localisator_Demo-objC.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Localisator_Demo-objC.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 34 | 83C963AA1A89EE46008D5C6D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 35 | 83C963AB1A89EE46008D5C6D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 36 | 83C963AD1A89EE46008D5C6D /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 37 | 83C963AE1A89EE46008D5C6D /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 38 | 83C963B01A89EE46008D5C6D /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 39 | 83C963B11A89EE46008D5C6D /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 40 | 83C963B61A89EE46008D5C6D /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 41 | 83C963BF1A89EE46008D5C6D /* Localisator_Demo-objCTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Localisator_Demo-objCTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | 83C963C41A89EE46008D5C6D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 43 | 83C963C51A89EE46008D5C6D /* Localisator_Demo_objCTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Localisator_Demo_objCTests.m; sourceTree = ""; }; 44 | 83C963D01A89EEDB008D5C6D /* Localisator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Localisator.h; sourceTree = ""; }; 45 | 83C963D11A89EEDB008D5C6D /* Localisator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Localisator.m; sourceTree = ""; }; 46 | 83C963D31A89EEE6008D5C6D /* LocalisatorViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocalisatorViewController.h; sourceTree = ""; }; 47 | 83C963D41A89EEE6008D5C6D /* LocalisatorViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LocalisatorViewController.m; sourceTree = ""; }; 48 | 83C963DB1A89F2A1008D5C6D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; 49 | 83C963DD1A89F2A4008D5C6D /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = ""; }; 50 | 83C964211A8A0385008D5C6D /* LaunchScreen.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LaunchScreen.xib; sourceTree = ""; }; 51 | 83C964221A8A0385008D5C6D /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = ""; }; 52 | /* End PBXFileReference section */ 53 | 54 | /* Begin PBXFrameworksBuildPhase section */ 55 | 83C963A31A89EE46008D5C6D /* Frameworks */ = { 56 | isa = PBXFrameworksBuildPhase; 57 | buildActionMask = 2147483647; 58 | files = ( 59 | ); 60 | runOnlyForDeploymentPostprocessing = 0; 61 | }; 62 | 83C963BC1A89EE46008D5C6D /* Frameworks */ = { 63 | isa = PBXFrameworksBuildPhase; 64 | buildActionMask = 2147483647; 65 | files = ( 66 | ); 67 | runOnlyForDeploymentPostprocessing = 0; 68 | }; 69 | /* End PBXFrameworksBuildPhase section */ 70 | 71 | /* Begin PBXGroup section */ 72 | 83C9639D1A89EE46008D5C6D = { 73 | isa = PBXGroup; 74 | children = ( 75 | 83C963CF1A89EEDB008D5C6D /* Localisator */, 76 | 83C963A81A89EE46008D5C6D /* Localisator_Demo-objC */, 77 | 83C963C21A89EE46008D5C6D /* Localisator_Demo-objCTests */, 78 | 83C963A71A89EE46008D5C6D /* Products */, 79 | ); 80 | sourceTree = ""; 81 | }; 82 | 83C963A71A89EE46008D5C6D /* Products */ = { 83 | isa = PBXGroup; 84 | children = ( 85 | 83C963A61A89EE46008D5C6D /* Localisator_Demo-objC.app */, 86 | 83C963BF1A89EE46008D5C6D /* Localisator_Demo-objCTests.xctest */, 87 | ); 88 | name = Products; 89 | sourceTree = ""; 90 | }; 91 | 83C963A81A89EE46008D5C6D /* Localisator_Demo-objC */ = { 92 | isa = PBXGroup; 93 | children = ( 94 | 83C963AD1A89EE46008D5C6D /* AppDelegate.h */, 95 | 83C963AE1A89EE46008D5C6D /* AppDelegate.m */, 96 | 83C963B01A89EE46008D5C6D /* ViewController.h */, 97 | 83C963B11A89EE46008D5C6D /* ViewController.m */, 98 | 83C963D31A89EEE6008D5C6D /* LocalisatorViewController.h */, 99 | 83C963D41A89EEE6008D5C6D /* LocalisatorViewController.m */, 100 | 83C964211A8A0385008D5C6D /* LaunchScreen.xib */, 101 | 83C964221A8A0385008D5C6D /* Main.storyboard */, 102 | 83C963DC1A89F2A1008D5C6D /* Localizable.strings */, 103 | 83C963B61A89EE46008D5C6D /* Images.xcassets */, 104 | 83C963A91A89EE46008D5C6D /* Supporting Files */, 105 | ); 106 | path = "Localisator_Demo-objC"; 107 | sourceTree = ""; 108 | }; 109 | 83C963A91A89EE46008D5C6D /* Supporting Files */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | 83C963AA1A89EE46008D5C6D /* Info.plist */, 113 | 83C963AB1A89EE46008D5C6D /* main.m */, 114 | ); 115 | name = "Supporting Files"; 116 | sourceTree = ""; 117 | }; 118 | 83C963C21A89EE46008D5C6D /* Localisator_Demo-objCTests */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | 83C963C51A89EE46008D5C6D /* Localisator_Demo_objCTests.m */, 122 | 83C963C31A89EE46008D5C6D /* Supporting Files */, 123 | ); 124 | path = "Localisator_Demo-objCTests"; 125 | sourceTree = ""; 126 | }; 127 | 83C963C31A89EE46008D5C6D /* Supporting Files */ = { 128 | isa = PBXGroup; 129 | children = ( 130 | 83C963C41A89EE46008D5C6D /* Info.plist */, 131 | ); 132 | name = "Supporting Files"; 133 | sourceTree = ""; 134 | }; 135 | 83C963CF1A89EEDB008D5C6D /* Localisator */ = { 136 | isa = PBXGroup; 137 | children = ( 138 | 83C963D01A89EEDB008D5C6D /* Localisator.h */, 139 | 83C963D11A89EEDB008D5C6D /* Localisator.m */, 140 | ); 141 | name = Localisator; 142 | path = ../Localisator; 143 | sourceTree = ""; 144 | }; 145 | /* End PBXGroup section */ 146 | 147 | /* Begin PBXNativeTarget section */ 148 | 83C963A51A89EE46008D5C6D /* Localisator_Demo-objC */ = { 149 | isa = PBXNativeTarget; 150 | buildConfigurationList = 83C963C91A89EE46008D5C6D /* Build configuration list for PBXNativeTarget "Localisator_Demo-objC" */; 151 | buildPhases = ( 152 | 83C963A21A89EE46008D5C6D /* Sources */, 153 | 83C963A31A89EE46008D5C6D /* Frameworks */, 154 | 83C963A41A89EE46008D5C6D /* Resources */, 155 | ); 156 | buildRules = ( 157 | ); 158 | dependencies = ( 159 | ); 160 | name = "Localisator_Demo-objC"; 161 | productName = "Localisator_Demo-objC"; 162 | productReference = 83C963A61A89EE46008D5C6D /* Localisator_Demo-objC.app */; 163 | productType = "com.apple.product-type.application"; 164 | }; 165 | 83C963BE1A89EE46008D5C6D /* Localisator_Demo-objCTests */ = { 166 | isa = PBXNativeTarget; 167 | buildConfigurationList = 83C963CC1A89EE46008D5C6D /* Build configuration list for PBXNativeTarget "Localisator_Demo-objCTests" */; 168 | buildPhases = ( 169 | 83C963BB1A89EE46008D5C6D /* Sources */, 170 | 83C963BC1A89EE46008D5C6D /* Frameworks */, 171 | 83C963BD1A89EE46008D5C6D /* Resources */, 172 | ); 173 | buildRules = ( 174 | ); 175 | dependencies = ( 176 | 83C963C11A89EE46008D5C6D /* PBXTargetDependency */, 177 | ); 178 | name = "Localisator_Demo-objCTests"; 179 | productName = "Localisator_Demo-objCTests"; 180 | productReference = 83C963BF1A89EE46008D5C6D /* Localisator_Demo-objCTests.xctest */; 181 | productType = "com.apple.product-type.bundle.unit-test"; 182 | }; 183 | /* End PBXNativeTarget section */ 184 | 185 | /* Begin PBXProject section */ 186 | 83C9639E1A89EE46008D5C6D /* Project object */ = { 187 | isa = PBXProject; 188 | attributes = { 189 | LastUpgradeCheck = 0610; 190 | ORGANIZATIONNAME = "Michaël Azevedo"; 191 | TargetAttributes = { 192 | 83C963A51A89EE46008D5C6D = { 193 | CreatedOnToolsVersion = 6.1; 194 | }; 195 | 83C963BE1A89EE46008D5C6D = { 196 | CreatedOnToolsVersion = 6.1; 197 | TestTargetID = 83C963A51A89EE46008D5C6D; 198 | }; 199 | }; 200 | }; 201 | buildConfigurationList = 83C963A11A89EE46008D5C6D /* Build configuration list for PBXProject "Localisator_Demo-objC" */; 202 | compatibilityVersion = "Xcode 3.2"; 203 | developmentRegion = English; 204 | hasScannedForEncodings = 0; 205 | knownRegions = ( 206 | en, 207 | Base, 208 | fr, 209 | ); 210 | mainGroup = 83C9639D1A89EE46008D5C6D; 211 | productRefGroup = 83C963A71A89EE46008D5C6D /* Products */; 212 | projectDirPath = ""; 213 | projectRoot = ""; 214 | targets = ( 215 | 83C963A51A89EE46008D5C6D /* Localisator_Demo-objC */, 216 | 83C963BE1A89EE46008D5C6D /* Localisator_Demo-objCTests */, 217 | ); 218 | }; 219 | /* End PBXProject section */ 220 | 221 | /* Begin PBXResourcesBuildPhase section */ 222 | 83C963A41A89EE46008D5C6D /* Resources */ = { 223 | isa = PBXResourcesBuildPhase; 224 | buildActionMask = 2147483647; 225 | files = ( 226 | 83C964231A8A0385008D5C6D /* LaunchScreen.xib in Resources */, 227 | 83C964241A8A0385008D5C6D /* Main.storyboard in Resources */, 228 | 83C963DE1A89F3D5008D5C6D /* Localizable.strings in Resources */, 229 | 83C963B71A89EE46008D5C6D /* Images.xcassets in Resources */, 230 | ); 231 | runOnlyForDeploymentPostprocessing = 0; 232 | }; 233 | 83C963BD1A89EE46008D5C6D /* Resources */ = { 234 | isa = PBXResourcesBuildPhase; 235 | buildActionMask = 2147483647; 236 | files = ( 237 | ); 238 | runOnlyForDeploymentPostprocessing = 0; 239 | }; 240 | /* End PBXResourcesBuildPhase section */ 241 | 242 | /* Begin PBXSourcesBuildPhase section */ 243 | 83C963A21A89EE46008D5C6D /* Sources */ = { 244 | isa = PBXSourcesBuildPhase; 245 | buildActionMask = 2147483647; 246 | files = ( 247 | 83C963B21A89EE46008D5C6D /* ViewController.m in Sources */, 248 | 83C963D21A89EEDB008D5C6D /* Localisator.m in Sources */, 249 | 83C963D51A89EEE6008D5C6D /* LocalisatorViewController.m in Sources */, 250 | 83C963AF1A89EE46008D5C6D /* AppDelegate.m in Sources */, 251 | 83C963AC1A89EE46008D5C6D /* main.m in Sources */, 252 | ); 253 | runOnlyForDeploymentPostprocessing = 0; 254 | }; 255 | 83C963BB1A89EE46008D5C6D /* Sources */ = { 256 | isa = PBXSourcesBuildPhase; 257 | buildActionMask = 2147483647; 258 | files = ( 259 | 83C963C61A89EE46008D5C6D /* Localisator_Demo_objCTests.m in Sources */, 260 | ); 261 | runOnlyForDeploymentPostprocessing = 0; 262 | }; 263 | /* End PBXSourcesBuildPhase section */ 264 | 265 | /* Begin PBXTargetDependency section */ 266 | 83C963C11A89EE46008D5C6D /* PBXTargetDependency */ = { 267 | isa = PBXTargetDependency; 268 | target = 83C963A51A89EE46008D5C6D /* Localisator_Demo-objC */; 269 | targetProxy = 83C963C01A89EE46008D5C6D /* PBXContainerItemProxy */; 270 | }; 271 | /* End PBXTargetDependency section */ 272 | 273 | /* Begin PBXVariantGroup section */ 274 | 83C963DC1A89F2A1008D5C6D /* Localizable.strings */ = { 275 | isa = PBXVariantGroup; 276 | children = ( 277 | 83C963DB1A89F2A1008D5C6D /* en */, 278 | 83C963DD1A89F2A4008D5C6D /* fr */, 279 | ); 280 | name = Localizable.strings; 281 | sourceTree = ""; 282 | }; 283 | /* End PBXVariantGroup section */ 284 | 285 | /* Begin XCBuildConfiguration section */ 286 | 83C963C71A89EE46008D5C6D /* Debug */ = { 287 | isa = XCBuildConfiguration; 288 | buildSettings = { 289 | ALWAYS_SEARCH_USER_PATHS = NO; 290 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 291 | CLANG_CXX_LIBRARY = "libc++"; 292 | CLANG_ENABLE_MODULES = YES; 293 | CLANG_ENABLE_OBJC_ARC = YES; 294 | CLANG_WARN_BOOL_CONVERSION = YES; 295 | CLANG_WARN_CONSTANT_CONVERSION = YES; 296 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 297 | CLANG_WARN_EMPTY_BODY = YES; 298 | CLANG_WARN_ENUM_CONVERSION = YES; 299 | CLANG_WARN_INT_CONVERSION = YES; 300 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 301 | CLANG_WARN_UNREACHABLE_CODE = YES; 302 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 303 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 304 | COPY_PHASE_STRIP = NO; 305 | ENABLE_STRICT_OBJC_MSGSEND = YES; 306 | GCC_C_LANGUAGE_STANDARD = gnu99; 307 | GCC_DYNAMIC_NO_PIC = NO; 308 | GCC_OPTIMIZATION_LEVEL = 0; 309 | GCC_PREPROCESSOR_DEFINITIONS = ( 310 | "DEBUG=1", 311 | "$(inherited)", 312 | ); 313 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 314 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 315 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 316 | GCC_WARN_UNDECLARED_SELECTOR = YES; 317 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 318 | GCC_WARN_UNUSED_FUNCTION = YES; 319 | GCC_WARN_UNUSED_VARIABLE = YES; 320 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 321 | MTL_ENABLE_DEBUG_INFO = YES; 322 | ONLY_ACTIVE_ARCH = YES; 323 | SDKROOT = iphoneos; 324 | }; 325 | name = Debug; 326 | }; 327 | 83C963C81A89EE46008D5C6D /* Release */ = { 328 | isa = XCBuildConfiguration; 329 | buildSettings = { 330 | ALWAYS_SEARCH_USER_PATHS = NO; 331 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 332 | CLANG_CXX_LIBRARY = "libc++"; 333 | CLANG_ENABLE_MODULES = YES; 334 | CLANG_ENABLE_OBJC_ARC = YES; 335 | CLANG_WARN_BOOL_CONVERSION = YES; 336 | CLANG_WARN_CONSTANT_CONVERSION = YES; 337 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 338 | CLANG_WARN_EMPTY_BODY = YES; 339 | CLANG_WARN_ENUM_CONVERSION = YES; 340 | CLANG_WARN_INT_CONVERSION = YES; 341 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 342 | CLANG_WARN_UNREACHABLE_CODE = YES; 343 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 344 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 345 | COPY_PHASE_STRIP = YES; 346 | ENABLE_NS_ASSERTIONS = NO; 347 | ENABLE_STRICT_OBJC_MSGSEND = YES; 348 | GCC_C_LANGUAGE_STANDARD = gnu99; 349 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 350 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 351 | GCC_WARN_UNDECLARED_SELECTOR = YES; 352 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 353 | GCC_WARN_UNUSED_FUNCTION = YES; 354 | GCC_WARN_UNUSED_VARIABLE = YES; 355 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 356 | MTL_ENABLE_DEBUG_INFO = NO; 357 | SDKROOT = iphoneos; 358 | VALIDATE_PRODUCT = YES; 359 | }; 360 | name = Release; 361 | }; 362 | 83C963CA1A89EE46008D5C6D /* Debug */ = { 363 | isa = XCBuildConfiguration; 364 | buildSettings = { 365 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 366 | INFOPLIST_FILE = "Localisator_Demo-objC/Info.plist"; 367 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 368 | PRODUCT_NAME = "$(TARGET_NAME)"; 369 | }; 370 | name = Debug; 371 | }; 372 | 83C963CB1A89EE46008D5C6D /* Release */ = { 373 | isa = XCBuildConfiguration; 374 | buildSettings = { 375 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 376 | INFOPLIST_FILE = "Localisator_Demo-objC/Info.plist"; 377 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 378 | PRODUCT_NAME = "$(TARGET_NAME)"; 379 | }; 380 | name = Release; 381 | }; 382 | 83C963CD1A89EE46008D5C6D /* Debug */ = { 383 | isa = XCBuildConfiguration; 384 | buildSettings = { 385 | BUNDLE_LOADER = "$(TEST_HOST)"; 386 | FRAMEWORK_SEARCH_PATHS = ( 387 | "$(SDKROOT)/Developer/Library/Frameworks", 388 | "$(inherited)", 389 | ); 390 | GCC_PREPROCESSOR_DEFINITIONS = ( 391 | "DEBUG=1", 392 | "$(inherited)", 393 | ); 394 | INFOPLIST_FILE = "Localisator_Demo-objCTests/Info.plist"; 395 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 396 | PRODUCT_NAME = "$(TARGET_NAME)"; 397 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Localisator_Demo-objC.app/Localisator_Demo-objC"; 398 | }; 399 | name = Debug; 400 | }; 401 | 83C963CE1A89EE46008D5C6D /* Release */ = { 402 | isa = XCBuildConfiguration; 403 | buildSettings = { 404 | BUNDLE_LOADER = "$(TEST_HOST)"; 405 | FRAMEWORK_SEARCH_PATHS = ( 406 | "$(SDKROOT)/Developer/Library/Frameworks", 407 | "$(inherited)", 408 | ); 409 | INFOPLIST_FILE = "Localisator_Demo-objCTests/Info.plist"; 410 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 411 | PRODUCT_NAME = "$(TARGET_NAME)"; 412 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Localisator_Demo-objC.app/Localisator_Demo-objC"; 413 | }; 414 | name = Release; 415 | }; 416 | /* End XCBuildConfiguration section */ 417 | 418 | /* Begin XCConfigurationList section */ 419 | 83C963A11A89EE46008D5C6D /* Build configuration list for PBXProject "Localisator_Demo-objC" */ = { 420 | isa = XCConfigurationList; 421 | buildConfigurations = ( 422 | 83C963C71A89EE46008D5C6D /* Debug */, 423 | 83C963C81A89EE46008D5C6D /* Release */, 424 | ); 425 | defaultConfigurationIsVisible = 0; 426 | defaultConfigurationName = Release; 427 | }; 428 | 83C963C91A89EE46008D5C6D /* Build configuration list for PBXNativeTarget "Localisator_Demo-objC" */ = { 429 | isa = XCConfigurationList; 430 | buildConfigurations = ( 431 | 83C963CA1A89EE46008D5C6D /* Debug */, 432 | 83C963CB1A89EE46008D5C6D /* Release */, 433 | ); 434 | defaultConfigurationIsVisible = 0; 435 | defaultConfigurationName = Release; 436 | }; 437 | 83C963CC1A89EE46008D5C6D /* Build configuration list for PBXNativeTarget "Localisator_Demo-objCTests" */ = { 438 | isa = XCConfigurationList; 439 | buildConfigurations = ( 440 | 83C963CD1A89EE46008D5C6D /* Debug */, 441 | 83C963CE1A89EE46008D5C6D /* Release */, 442 | ); 443 | defaultConfigurationIsVisible = 0; 444 | defaultConfigurationName = Release; 445 | }; 446 | /* End XCConfigurationList section */ 447 | }; 448 | rootObject = 83C9639E1A89EE46008D5C6D /* Project object */; 449 | } 450 | -------------------------------------------------------------------------------- /Localisator_Demo-objC/Localisator_Demo-objC.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Localisator_Demo-objC/Localisator_Demo-objC.xcodeproj/project.xcworkspace/xcshareddata/Localisator_Demo-objC.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 0AEC46A9-955F-4353-9910-70FA4F2DD4B5 9 | IDESourceControlProjectName 10 | Localisator_Demo-objC 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 507DDA19FB8A4E3E61000EA26CDFCCF02B55BD44 14 | https://github.com/micazeve/iOS-CustomLocalisator.git 15 | 16 | IDESourceControlProjectPath 17 | Localisator_Demo-objC/Localisator_Demo-objC.xcodeproj 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 507DDA19FB8A4E3E61000EA26CDFCCF02B55BD44 21 | ../../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/micazeve/iOS-CustomLocalisator.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 507DDA19FB8A4E3E61000EA26CDFCCF02B55BD44 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 507DDA19FB8A4E3E61000EA26CDFCCF02B55BD44 36 | IDESourceControlWCCName 37 | iOS-CustomLocalisator 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Localisator_Demo-objC/Localisator_Demo-objC.xcodeproj/xcuserdata/mazevedo.xcuserdatad/xcschemes/Localisator_Demo-objC.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 94 | 100 | 101 | 102 | 103 | 105 | 106 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /Localisator_Demo-objC/Localisator_Demo-objC.xcodeproj/xcuserdata/mazevedo.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Localisator_Demo-objC.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 83C963A51A89EE46008D5C6D 16 | 17 | primary 18 | 19 | 20 | 83C963BE1A89EE46008D5C6D 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Localisator_Demo-objC/Localisator_Demo-objC/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // Localisator_Demo-objC 4 | // 5 | // Created by Michaël Azevedo on 10/02/2015. 6 | // Copyright (c) 2015 Michaël Azevedo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /Localisator_Demo-objC/Localisator_Demo-objC/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // Localisator_Demo-objC 4 | // 5 | // Created by Michaël Azevedo on 10/02/2015. 6 | // Copyright (c) 2015 Michaël Azevedo. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | - (void)applicationWillResignActive:(UIApplication *)application { 24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 26 | } 27 | 28 | - (void)applicationDidEnterBackground:(UIApplication *)application { 29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 31 | } 32 | 33 | - (void)applicationWillEnterForeground:(UIApplication *)application { 34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 35 | } 36 | 37 | - (void)applicationDidBecomeActive:(UIApplication *)application { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application { 42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /Localisator_Demo-objC/Localisator_Demo-objC/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /Localisator_Demo-objC/Localisator_Demo-objC/Images.xcassets/DeviceLanguage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "DeviceLanguage.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Localisator_Demo-objC/Localisator_Demo-objC/Images.xcassets/DeviceLanguage.imageset/DeviceLanguage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/micazeve/iOS-CustomLocalisator/45093c3da605e1c35487f56c6d1c98dc77b8833b/Localisator_Demo-objC/Localisator_Demo-objC/Images.xcassets/DeviceLanguage.imageset/DeviceLanguage.png -------------------------------------------------------------------------------- /Localisator_Demo-objC/Localisator_Demo-objC/Images.xcassets/English_en.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "English.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Localisator_Demo-objC/Localisator_Demo-objC/Images.xcassets/English_en.imageset/English.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/micazeve/iOS-CustomLocalisator/45093c3da605e1c35487f56c6d1c98dc77b8833b/Localisator_Demo-objC/Localisator_Demo-objC/Images.xcassets/English_en.imageset/English.png -------------------------------------------------------------------------------- /Localisator_Demo-objC/Localisator_Demo-objC/Images.xcassets/French_fr.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "French.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Localisator_Demo-objC/Localisator_Demo-objC/Images.xcassets/French_fr.imageset/French.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/micazeve/iOS-CustomLocalisator/45093c3da605e1c35487f56c6d1c98dc77b8833b/Localisator_Demo-objC/Localisator_Demo-objC/Images.xcassets/French_fr.imageset/French.png -------------------------------------------------------------------------------- /Localisator_Demo-objC/Localisator_Demo-objC/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | micazeve.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /Localisator_Demo-objC/Localisator_Demo-objC/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Localisator_Demo-objC/Localisator_Demo-objC/LocalisatorViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // LocalisatorViewController.h 3 | // CustomLocalisator 4 | // 5 | // Created by Michael Azevedo on 06/03/2014. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface LocalisatorViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Localisator_Demo-objC/Localisator_Demo-objC/LocalisatorViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // LocalisatorViewController.m 3 | // CustomLocalisator 4 | // 5 | // Created by Michael Azevedo on 06/03/2014. 6 | // 7 | // 8 | 9 | #import "LocalisatorViewController.h" 10 | #import "Localisator.h" 11 | 12 | @interface LocalisatorViewController () 13 | @property (weak, nonatomic) IBOutlet UITableView *tableViewLanguages; 14 | 15 | @property (weak, nonatomic) IBOutlet UIImageView *imageViewFlag; 16 | 17 | @property (weak, nonatomic) IBOutlet UILabel *labelCurrentLanguage; 18 | @property (weak, nonatomic) IBOutlet UILabel *labelChooseLanguage; 19 | @property (weak, nonatomic) IBOutlet UILabel *labelSaveLanguage; 20 | 21 | @property (weak, nonatomic) IBOutlet UISwitch *switchSaveLanguage; 22 | 23 | 24 | @property NSArray * arrayOfLanguages; 25 | 26 | @end 27 | 28 | @implementation LocalisatorViewController 29 | 30 | #pragma mark - Init methods 31 | 32 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 33 | { 34 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 35 | if (self) { 36 | // Custom initialization 37 | } 38 | return self; 39 | } 40 | 41 | - (void)viewDidLoad 42 | { 43 | [super viewDidLoad]; 44 | // Do any additional setup after loading the view. 45 | 46 | self.arrayOfLanguages = [[[Localisator sharedInstance] availableLanguagesArray] copy]; 47 | 48 | [[NSNotificationCenter defaultCenter] addObserver:self 49 | selector:@selector(receiveLanguageChangedNotification:) 50 | name:kNotificationLanguageChanged 51 | object:nil]; 52 | 53 | [self.switchSaveLanguage setOn:[[Localisator sharedInstance] saveInUserDefaults]]; 54 | 55 | [self configureViewFromLocalisation]; 56 | } 57 | 58 | -(void)configureViewFromLocalisation 59 | { 60 | self.title = LOCALIZATION(@"LocalisatorViewTitle"); 61 | 62 | [self.labelCurrentLanguage setText:LOCALIZATION(@"LocalisatorViewCurrentLanguageText")]; 63 | [self.labelChooseLanguage setText:LOCALIZATION(@"LocalisatorViewTitle")]; 64 | [self.labelSaveLanguage setText:LOCALIZATION(@"LocalisatorViewSaveText")]; 65 | [self.tableViewLanguages reloadData]; 66 | 67 | [self.imageViewFlag setImage:[UIImage imageNamed:[[Localisator sharedInstance] currentLanguage]]]; 68 | 69 | } 70 | 71 | #pragma mark - Action methods 72 | 73 | - (IBAction)switchValueChanged:(UISwitch *)sender 74 | { 75 | if (sender == self.switchSaveLanguage) 76 | { 77 | [[Localisator sharedInstance] setSaveInUserDefaults:self.switchSaveLanguage.isOn]; 78 | } 79 | } 80 | 81 | 82 | #pragma mark - Notification methods 83 | 84 | - (void) receiveLanguageChangedNotification:(NSNotification *) notification 85 | { 86 | if ([notification.name isEqualToString:kNotificationLanguageChanged]) 87 | { 88 | [self configureViewFromLocalisation]; 89 | } 90 | } 91 | 92 | #pragma mark - UITableViewDataSource protocol conformance 93 | 94 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 95 | { 96 | if (self.arrayOfLanguages == nil) 97 | return 0; 98 | 99 | return [self.arrayOfLanguages count]; 100 | } 101 | 102 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 103 | { 104 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MyIdentifier"]; 105 | 106 | if (cell == nil) 107 | { 108 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"MyIdentifier"] ; 109 | cell.selectionStyle = UITableViewCellSelectionStyleGray; 110 | } 111 | 112 | cell.imageView.image = [UIImage imageNamed:self.arrayOfLanguages[indexPath.row]]; 113 | cell.textLabel.text = LOCALIZATION(self.arrayOfLanguages[indexPath.row]); 114 | 115 | /* Now that the cell is configured we return it to the table view so that it can display it */ 116 | 117 | return cell; 118 | } 119 | 120 | #pragma mark - UITableViewDelegate protocol conformance 121 | 122 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 123 | { 124 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 125 | 126 | if ([[Localisator sharedInstance] setLanguage:self.arrayOfLanguages[indexPath.row]]) 127 | { 128 | UIAlertView * alertView = [[UIAlertView alloc] initWithTitle:nil message:LOCALIZATION(@"languageChangedWarningMessage") delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; 129 | [alertView show]; 130 | } 131 | } 132 | 133 | #pragma mark - Memory management 134 | 135 | - (void)didReceiveMemoryWarning 136 | { 137 | [super didReceiveMemoryWarning]; 138 | // Dispose of any resources that can be recreated. 139 | } 140 | 141 | -(void)dealloc 142 | { 143 | [[NSNotificationCenter defaultCenter] removeObserver:self name:kNotificationLanguageChanged object:nil]; 144 | } 145 | 146 | @end 147 | -------------------------------------------------------------------------------- /Localisator_Demo-objC/Localisator_Demo-objC/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 55 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 117 | 122 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | -------------------------------------------------------------------------------- /Localisator_Demo-objC/Localisator_Demo-objC/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // Localisator_Demo-objC 4 | // 5 | // Created by Michaël Azevedo on 10/02/2015. 6 | // Copyright (c) 2015 Michaël Azevedo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /Localisator_Demo-objC/Localisator_Demo-objC/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // Localisator_Demo-objC 4 | // 5 | // Created by Michaël Azevedo on 10/02/2015. 6 | // Copyright (c) 2015 Michaël Azevedo. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "Localisator.h" 11 | #import "LocalisatorViewController.h" 12 | 13 | @interface ViewController () 14 | 15 | @property (weak, nonatomic) IBOutlet UILabel *homeTitleLabel; 16 | @property (weak, nonatomic) IBOutlet UILabel *homeDescLabel; 17 | @property (weak, nonatomic) IBOutlet UIButton *languageButton; 18 | 19 | @end 20 | 21 | @implementation ViewController 22 | 23 | #pragma mark - Init methods 24 | 25 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 26 | { 27 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 28 | if (self) { 29 | // Custom initialization 30 | } 31 | return self; 32 | } 33 | 34 | - (void)viewDidLoad 35 | { 36 | [super viewDidLoad]; 37 | // Do any additional setup after loading the view. 38 | 39 | self.title = @"Localisator"; 40 | 41 | [[NSNotificationCenter defaultCenter] addObserver:self 42 | selector:@selector(receiveLanguageChangedNotification:) 43 | name:kNotificationLanguageChanged 44 | object:nil]; 45 | 46 | [self configureViewFromLocalisation]; 47 | } 48 | 49 | -(void)configureViewFromLocalisation 50 | { 51 | [self.homeTitleLabel setText:LOCALIZATION(@"HomeTitleText")]; 52 | [self.homeDescLabel setText:LOCALIZATION(@"HomeDescText")]; 53 | 54 | [self.languageButton setTitle:LOCALIZATION(@"HomeButtonTitle") forState:UIControlStateNormal]; 55 | } 56 | 57 | #pragma mark - Notification methods 58 | 59 | - (void) receiveLanguageChangedNotification:(NSNotification *) notification 60 | { 61 | if ([notification.name isEqualToString:kNotificationLanguageChanged]) 62 | { 63 | [self configureViewFromLocalisation]; 64 | } 65 | } 66 | 67 | #pragma mark - Memory management 68 | 69 | - (void)didReceiveMemoryWarning 70 | { 71 | [super didReceiveMemoryWarning]; 72 | // Dispose of any resources that can be recreated. 73 | } 74 | 75 | -(void)dealloc 76 | { 77 | [[NSNotificationCenter defaultCenter] removeObserver:self name:kNotificationLanguageChanged object:nil]; 78 | } 79 | 80 | 81 | @end 82 | -------------------------------------------------------------------------------- /Localisator_Demo-objC/Localisator_Demo-objC/en.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | "DeviceLanguage" = "iDevice Language"; 2 | "English_en" = "English"; 3 | "French_fr" = "French"; 4 | 5 | "HomeTitleText" = "Welcome"; 6 | "HomeDescText" = "Localisator allow you to change your app language globally without having to restart it, and use the already existing Localizable strings."; 7 | "HomeButtonTitle" = "Choose language"; 8 | 9 | "LocalisatorViewTitle" = "Choose your language :"; 10 | "LocalisatorViewCurrentLanguageText" = "Current language :"; 11 | "LocalisatorViewTestText" = "Test labels :"; 12 | "LocalisatorViewSaveText" = "Save language :"; 13 | 14 | "languageChangedWarningMessage" = "App language just changed !"; 15 | -------------------------------------------------------------------------------- /Localisator_Demo-objC/Localisator_Demo-objC/fr.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | "DeviceLanguage" = "Langue de l'iDevice"; 2 | "English_en" = "Anglais"; 3 | "French_fr" = "Français"; 4 | 5 | "HomeTitleText" = "Bienvenue"; 6 | "HomeDescText" = "Localisator est une classe permettant de changer la langue de l'application sans avoir à la relancer, et en utilisant les fichiers de langues déjà existants."; 7 | "HomeButtonTitle" = "Choisir la langue"; 8 | 9 | "LocalisatorViewTitle" = "Choix de la langue"; 10 | "LocalisatorViewCurrentLanguageText" = "Langue actuelle :"; 11 | "LocalisatorViewTestText" = "Labels de test :"; 12 | "LocalisatorViewSaveText" = "Sauvegarder la langue :"; 13 | 14 | "languageChangedWarningMessage" = "La langue de l'application vient de changer !"; 15 | -------------------------------------------------------------------------------- /Localisator_Demo-objC/Localisator_Demo-objC/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // Localisator_Demo-objC 4 | // 5 | // Created by Michaël Azevedo on 10/02/2015. 6 | // Copyright (c) 2015 Michaël Azevedo. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Localisator_Demo-objC/Localisator_Demo-objCTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | micazeve.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Localisator_Demo-objC/Localisator_Demo-objCTests/Localisator_Demo_objCTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // Localisator_Demo_objCTests.m 3 | // Localisator_Demo-objCTests 4 | // 5 | // Created by Michaël Azevedo on 10/02/2015. 6 | // Copyright (c) 2015 Michaël Azevedo. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface Localisator_Demo_objCTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation Localisator_Demo_objCTests 17 | 18 | - (void)setUp { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown { 24 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | [super tearDown]; 26 | } 27 | 28 | - (void)testExample { 29 | // This is an example of a functional test case. 30 | XCTAssert(YES, @"Pass"); 31 | } 32 | 33 | - (void)testPerformanceExample { 34 | // This is an example of a performance test case. 35 | [self measureBlock:^{ 36 | // Put the code you want to measure the time of here. 37 | }]; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Localisator_Demo-swift/Localisator_Demo-swift.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 83C963F21A89F7FD008D5C6D /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83C963F11A89F7FD008D5C6D /* AppDelegate.swift */; }; 11 | 83C963F41A89F7FD008D5C6D /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83C963F31A89F7FD008D5C6D /* ViewController.swift */; }; 12 | 83C963F91A89F7FD008D5C6D /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 83C963F81A89F7FD008D5C6D /* Images.xcassets */; }; 13 | 83C964081A89F7FE008D5C6D /* Localisator_Demo_swiftTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83C964071A89F7FE008D5C6D /* Localisator_Demo_swiftTests.swift */; }; 14 | 83C964161A89F8C9008D5C6D /* Localisator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83C964151A89F8C9008D5C6D /* Localisator.swift */; }; 15 | 83C9641B1A8A02F1008D5C6D /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 83C9641D1A8A02F1008D5C6D /* Localizable.strings */; }; 16 | 83C964271A8A03CC008D5C6D /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 83C964251A8A03CC008D5C6D /* LaunchScreen.xib */; }; 17 | 83C964281A8A03CC008D5C6D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 83C964261A8A03CC008D5C6D /* Main.storyboard */; }; 18 | 83C9642A1A8A056A008D5C6D /* LocalisatorViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83C964291A8A056A008D5C6D /* LocalisatorViewController.swift */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXContainerItemProxy section */ 22 | 83C964021A89F7FE008D5C6D /* PBXContainerItemProxy */ = { 23 | isa = PBXContainerItemProxy; 24 | containerPortal = 83C963E41A89F7FD008D5C6D /* Project object */; 25 | proxyType = 1; 26 | remoteGlobalIDString = 83C963EB1A89F7FD008D5C6D; 27 | remoteInfo = "Localisator_Demo-swift"; 28 | }; 29 | /* End PBXContainerItemProxy section */ 30 | 31 | /* Begin PBXFileReference section */ 32 | 83C963EC1A89F7FD008D5C6D /* Localisator_Demo-swift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Localisator_Demo-swift.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 33 | 83C963F01A89F7FD008D5C6D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 34 | 83C963F11A89F7FD008D5C6D /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 35 | 83C963F31A89F7FD008D5C6D /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 36 | 83C963F81A89F7FD008D5C6D /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 37 | 83C964011A89F7FE008D5C6D /* Localisator_Demo-swiftTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Localisator_Demo-swiftTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 38 | 83C964061A89F7FE008D5C6D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 39 | 83C964071A89F7FE008D5C6D /* Localisator_Demo_swiftTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Localisator_Demo_swiftTests.swift; sourceTree = ""; }; 40 | 83C964151A89F8C9008D5C6D /* Localisator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Localisator.swift; sourceTree = ""; }; 41 | 83C9641C1A8A02F1008D5C6D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; 42 | 83C9641E1A8A02F4008D5C6D /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = ""; }; 43 | 83C964251A8A03CC008D5C6D /* LaunchScreen.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LaunchScreen.xib; sourceTree = ""; }; 44 | 83C964261A8A03CC008D5C6D /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = ""; }; 45 | 83C964291A8A056A008D5C6D /* LocalisatorViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LocalisatorViewController.swift; sourceTree = ""; }; 46 | /* End PBXFileReference section */ 47 | 48 | /* Begin PBXFrameworksBuildPhase section */ 49 | 83C963E91A89F7FD008D5C6D /* Frameworks */ = { 50 | isa = PBXFrameworksBuildPhase; 51 | buildActionMask = 2147483647; 52 | files = ( 53 | ); 54 | runOnlyForDeploymentPostprocessing = 0; 55 | }; 56 | 83C963FE1A89F7FD008D5C6D /* Frameworks */ = { 57 | isa = PBXFrameworksBuildPhase; 58 | buildActionMask = 2147483647; 59 | files = ( 60 | ); 61 | runOnlyForDeploymentPostprocessing = 0; 62 | }; 63 | /* End PBXFrameworksBuildPhase section */ 64 | 65 | /* Begin PBXGroup section */ 66 | 83C963E31A89F7FD008D5C6D = { 67 | isa = PBXGroup; 68 | children = ( 69 | 83C964111A89F8B0008D5C6D /* Localisator */, 70 | 83C963EE1A89F7FD008D5C6D /* Localisator_Demo-swift */, 71 | 83C964041A89F7FE008D5C6D /* Localisator_Demo-swiftTests */, 72 | 83C963ED1A89F7FD008D5C6D /* Products */, 73 | ); 74 | sourceTree = ""; 75 | }; 76 | 83C963ED1A89F7FD008D5C6D /* Products */ = { 77 | isa = PBXGroup; 78 | children = ( 79 | 83C963EC1A89F7FD008D5C6D /* Localisator_Demo-swift.app */, 80 | 83C964011A89F7FE008D5C6D /* Localisator_Demo-swiftTests.xctest */, 81 | ); 82 | name = Products; 83 | sourceTree = ""; 84 | }; 85 | 83C963EE1A89F7FD008D5C6D /* Localisator_Demo-swift */ = { 86 | isa = PBXGroup; 87 | children = ( 88 | 83C963F11A89F7FD008D5C6D /* AppDelegate.swift */, 89 | 83C963F31A89F7FD008D5C6D /* ViewController.swift */, 90 | 83C964291A8A056A008D5C6D /* LocalisatorViewController.swift */, 91 | 83C964251A8A03CC008D5C6D /* LaunchScreen.xib */, 92 | 83C964261A8A03CC008D5C6D /* Main.storyboard */, 93 | 83C9641D1A8A02F1008D5C6D /* Localizable.strings */, 94 | 83C963F81A89F7FD008D5C6D /* Images.xcassets */, 95 | 83C963EF1A89F7FD008D5C6D /* Supporting Files */, 96 | ); 97 | path = "Localisator_Demo-swift"; 98 | sourceTree = ""; 99 | }; 100 | 83C963EF1A89F7FD008D5C6D /* Supporting Files */ = { 101 | isa = PBXGroup; 102 | children = ( 103 | 83C963F01A89F7FD008D5C6D /* Info.plist */, 104 | ); 105 | name = "Supporting Files"; 106 | sourceTree = ""; 107 | }; 108 | 83C964041A89F7FE008D5C6D /* Localisator_Demo-swiftTests */ = { 109 | isa = PBXGroup; 110 | children = ( 111 | 83C964071A89F7FE008D5C6D /* Localisator_Demo_swiftTests.swift */, 112 | 83C964051A89F7FE008D5C6D /* Supporting Files */, 113 | ); 114 | path = "Localisator_Demo-swiftTests"; 115 | sourceTree = ""; 116 | }; 117 | 83C964051A89F7FE008D5C6D /* Supporting Files */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | 83C964061A89F7FE008D5C6D /* Info.plist */, 121 | ); 122 | name = "Supporting Files"; 123 | sourceTree = ""; 124 | }; 125 | 83C964111A89F8B0008D5C6D /* Localisator */ = { 126 | isa = PBXGroup; 127 | children = ( 128 | 83C964151A89F8C9008D5C6D /* Localisator.swift */, 129 | ); 130 | name = Localisator; 131 | path = ../Localisator; 132 | sourceTree = ""; 133 | }; 134 | /* End PBXGroup section */ 135 | 136 | /* Begin PBXNativeTarget section */ 137 | 83C963EB1A89F7FD008D5C6D /* Localisator_Demo-swift */ = { 138 | isa = PBXNativeTarget; 139 | buildConfigurationList = 83C9640B1A89F7FE008D5C6D /* Build configuration list for PBXNativeTarget "Localisator_Demo-swift" */; 140 | buildPhases = ( 141 | 83C963E81A89F7FD008D5C6D /* Sources */, 142 | 83C963E91A89F7FD008D5C6D /* Frameworks */, 143 | 83C963EA1A89F7FD008D5C6D /* Resources */, 144 | ); 145 | buildRules = ( 146 | ); 147 | dependencies = ( 148 | ); 149 | name = "Localisator_Demo-swift"; 150 | productName = "Localisator_Demo-swift"; 151 | productReference = 83C963EC1A89F7FD008D5C6D /* Localisator_Demo-swift.app */; 152 | productType = "com.apple.product-type.application"; 153 | }; 154 | 83C964001A89F7FD008D5C6D /* Localisator_Demo-swiftTests */ = { 155 | isa = PBXNativeTarget; 156 | buildConfigurationList = 83C9640E1A89F7FE008D5C6D /* Build configuration list for PBXNativeTarget "Localisator_Demo-swiftTests" */; 157 | buildPhases = ( 158 | 83C963FD1A89F7FD008D5C6D /* Sources */, 159 | 83C963FE1A89F7FD008D5C6D /* Frameworks */, 160 | 83C963FF1A89F7FD008D5C6D /* Resources */, 161 | ); 162 | buildRules = ( 163 | ); 164 | dependencies = ( 165 | 83C964031A89F7FE008D5C6D /* PBXTargetDependency */, 166 | ); 167 | name = "Localisator_Demo-swiftTests"; 168 | productName = "Localisator_Demo-swiftTests"; 169 | productReference = 83C964011A89F7FE008D5C6D /* Localisator_Demo-swiftTests.xctest */; 170 | productType = "com.apple.product-type.bundle.unit-test"; 171 | }; 172 | /* End PBXNativeTarget section */ 173 | 174 | /* Begin PBXProject section */ 175 | 83C963E41A89F7FD008D5C6D /* Project object */ = { 176 | isa = PBXProject; 177 | attributes = { 178 | LastSwiftMigration = 0700; 179 | LastSwiftUpdateCheck = 0700; 180 | LastUpgradeCheck = 0800; 181 | ORGANIZATIONNAME = "Michaël Azevedo"; 182 | TargetAttributes = { 183 | 83C963EB1A89F7FD008D5C6D = { 184 | CreatedOnToolsVersion = 6.1; 185 | DevelopmentTeam = WTV3ZNN6G7; 186 | LastSwiftMigration = 0800; 187 | }; 188 | 83C964001A89F7FD008D5C6D = { 189 | CreatedOnToolsVersion = 6.1; 190 | LastSwiftMigration = 0800; 191 | TestTargetID = 83C963EB1A89F7FD008D5C6D; 192 | }; 193 | }; 194 | }; 195 | buildConfigurationList = 83C963E71A89F7FD008D5C6D /* Build configuration list for PBXProject "Localisator_Demo-swift" */; 196 | compatibilityVersion = "Xcode 3.2"; 197 | developmentRegion = English; 198 | hasScannedForEncodings = 0; 199 | knownRegions = ( 200 | en, 201 | Base, 202 | fr, 203 | ); 204 | mainGroup = 83C963E31A89F7FD008D5C6D; 205 | productRefGroup = 83C963ED1A89F7FD008D5C6D /* Products */; 206 | projectDirPath = ""; 207 | projectRoot = ""; 208 | targets = ( 209 | 83C963EB1A89F7FD008D5C6D /* Localisator_Demo-swift */, 210 | 83C964001A89F7FD008D5C6D /* Localisator_Demo-swiftTests */, 211 | ); 212 | }; 213 | /* End PBXProject section */ 214 | 215 | /* Begin PBXResourcesBuildPhase section */ 216 | 83C963EA1A89F7FD008D5C6D /* Resources */ = { 217 | isa = PBXResourcesBuildPhase; 218 | buildActionMask = 2147483647; 219 | files = ( 220 | 83C964271A8A03CC008D5C6D /* LaunchScreen.xib in Resources */, 221 | 83C9641B1A8A02F1008D5C6D /* Localizable.strings in Resources */, 222 | 83C964281A8A03CC008D5C6D /* Main.storyboard in Resources */, 223 | 83C963F91A89F7FD008D5C6D /* Images.xcassets in Resources */, 224 | ); 225 | runOnlyForDeploymentPostprocessing = 0; 226 | }; 227 | 83C963FF1A89F7FD008D5C6D /* Resources */ = { 228 | isa = PBXResourcesBuildPhase; 229 | buildActionMask = 2147483647; 230 | files = ( 231 | ); 232 | runOnlyForDeploymentPostprocessing = 0; 233 | }; 234 | /* End PBXResourcesBuildPhase section */ 235 | 236 | /* Begin PBXSourcesBuildPhase section */ 237 | 83C963E81A89F7FD008D5C6D /* Sources */ = { 238 | isa = PBXSourcesBuildPhase; 239 | buildActionMask = 2147483647; 240 | files = ( 241 | 83C964161A89F8C9008D5C6D /* Localisator.swift in Sources */, 242 | 83C963F41A89F7FD008D5C6D /* ViewController.swift in Sources */, 243 | 83C9642A1A8A056A008D5C6D /* LocalisatorViewController.swift in Sources */, 244 | 83C963F21A89F7FD008D5C6D /* AppDelegate.swift in Sources */, 245 | ); 246 | runOnlyForDeploymentPostprocessing = 0; 247 | }; 248 | 83C963FD1A89F7FD008D5C6D /* Sources */ = { 249 | isa = PBXSourcesBuildPhase; 250 | buildActionMask = 2147483647; 251 | files = ( 252 | 83C964081A89F7FE008D5C6D /* Localisator_Demo_swiftTests.swift in Sources */, 253 | ); 254 | runOnlyForDeploymentPostprocessing = 0; 255 | }; 256 | /* End PBXSourcesBuildPhase section */ 257 | 258 | /* Begin PBXTargetDependency section */ 259 | 83C964031A89F7FE008D5C6D /* PBXTargetDependency */ = { 260 | isa = PBXTargetDependency; 261 | target = 83C963EB1A89F7FD008D5C6D /* Localisator_Demo-swift */; 262 | targetProxy = 83C964021A89F7FE008D5C6D /* PBXContainerItemProxy */; 263 | }; 264 | /* End PBXTargetDependency section */ 265 | 266 | /* Begin PBXVariantGroup section */ 267 | 83C9641D1A8A02F1008D5C6D /* Localizable.strings */ = { 268 | isa = PBXVariantGroup; 269 | children = ( 270 | 83C9641C1A8A02F1008D5C6D /* en */, 271 | 83C9641E1A8A02F4008D5C6D /* fr */, 272 | ); 273 | name = Localizable.strings; 274 | sourceTree = ""; 275 | }; 276 | /* End PBXVariantGroup section */ 277 | 278 | /* Begin XCBuildConfiguration section */ 279 | 83C964091A89F7FE008D5C6D /* Debug */ = { 280 | isa = XCBuildConfiguration; 281 | buildSettings = { 282 | ALWAYS_SEARCH_USER_PATHS = NO; 283 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 284 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 285 | CLANG_CXX_LIBRARY = "libc++"; 286 | CLANG_ENABLE_MODULES = YES; 287 | CLANG_ENABLE_OBJC_ARC = YES; 288 | CLANG_WARN_BOOL_CONVERSION = YES; 289 | CLANG_WARN_CONSTANT_CONVERSION = YES; 290 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 291 | CLANG_WARN_EMPTY_BODY = YES; 292 | CLANG_WARN_ENUM_CONVERSION = YES; 293 | CLANG_WARN_INFINITE_RECURSION = YES; 294 | CLANG_WARN_INT_CONVERSION = YES; 295 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 296 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 297 | CLANG_WARN_UNREACHABLE_CODE = YES; 298 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 299 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 300 | COPY_PHASE_STRIP = NO; 301 | ENABLE_STRICT_OBJC_MSGSEND = YES; 302 | ENABLE_TESTABILITY = YES; 303 | GCC_C_LANGUAGE_STANDARD = gnu99; 304 | GCC_DYNAMIC_NO_PIC = NO; 305 | GCC_NO_COMMON_BLOCKS = YES; 306 | GCC_OPTIMIZATION_LEVEL = 0; 307 | GCC_PREPROCESSOR_DEFINITIONS = ( 308 | "DEBUG=1", 309 | "$(inherited)", 310 | ); 311 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 312 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 313 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 314 | GCC_WARN_UNDECLARED_SELECTOR = YES; 315 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 316 | GCC_WARN_UNUSED_FUNCTION = YES; 317 | GCC_WARN_UNUSED_VARIABLE = YES; 318 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 319 | MTL_ENABLE_DEBUG_INFO = YES; 320 | ONLY_ACTIVE_ARCH = YES; 321 | SDKROOT = iphoneos; 322 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 323 | }; 324 | name = Debug; 325 | }; 326 | 83C9640A1A89F7FE008D5C6D /* Release */ = { 327 | isa = XCBuildConfiguration; 328 | buildSettings = { 329 | ALWAYS_SEARCH_USER_PATHS = NO; 330 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 331 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 332 | CLANG_CXX_LIBRARY = "libc++"; 333 | CLANG_ENABLE_MODULES = YES; 334 | CLANG_ENABLE_OBJC_ARC = YES; 335 | CLANG_WARN_BOOL_CONVERSION = YES; 336 | CLANG_WARN_CONSTANT_CONVERSION = YES; 337 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 338 | CLANG_WARN_EMPTY_BODY = YES; 339 | CLANG_WARN_ENUM_CONVERSION = YES; 340 | CLANG_WARN_INFINITE_RECURSION = YES; 341 | CLANG_WARN_INT_CONVERSION = YES; 342 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 343 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 344 | CLANG_WARN_UNREACHABLE_CODE = YES; 345 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 346 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 347 | COPY_PHASE_STRIP = YES; 348 | ENABLE_NS_ASSERTIONS = NO; 349 | ENABLE_STRICT_OBJC_MSGSEND = YES; 350 | GCC_C_LANGUAGE_STANDARD = gnu99; 351 | GCC_NO_COMMON_BLOCKS = YES; 352 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 353 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 354 | GCC_WARN_UNDECLARED_SELECTOR = YES; 355 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 356 | GCC_WARN_UNUSED_FUNCTION = YES; 357 | GCC_WARN_UNUSED_VARIABLE = YES; 358 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 359 | MTL_ENABLE_DEBUG_INFO = NO; 360 | SDKROOT = iphoneos; 361 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 362 | VALIDATE_PRODUCT = YES; 363 | }; 364 | name = Release; 365 | }; 366 | 83C9640C1A89F7FE008D5C6D /* Debug */ = { 367 | isa = XCBuildConfiguration; 368 | buildSettings = { 369 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 370 | DEVELOPMENT_TEAM = WTV3ZNN6G7; 371 | INFOPLIST_FILE = "Localisator_Demo-swift/Info.plist"; 372 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 373 | PRODUCT_BUNDLE_IDENTIFIER = "micazeve.$(PRODUCT_NAME:rfc1034identifier)"; 374 | PRODUCT_NAME = "$(TARGET_NAME)"; 375 | SWIFT_VERSION = 3.0; 376 | }; 377 | name = Debug; 378 | }; 379 | 83C9640D1A89F7FE008D5C6D /* Release */ = { 380 | isa = XCBuildConfiguration; 381 | buildSettings = { 382 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 383 | DEVELOPMENT_TEAM = WTV3ZNN6G7; 384 | INFOPLIST_FILE = "Localisator_Demo-swift/Info.plist"; 385 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 386 | PRODUCT_BUNDLE_IDENTIFIER = "micazeve.$(PRODUCT_NAME:rfc1034identifier)"; 387 | PRODUCT_NAME = "$(TARGET_NAME)"; 388 | SWIFT_VERSION = 3.0; 389 | }; 390 | name = Release; 391 | }; 392 | 83C9640F1A89F7FE008D5C6D /* Debug */ = { 393 | isa = XCBuildConfiguration; 394 | buildSettings = { 395 | BUNDLE_LOADER = "$(TEST_HOST)"; 396 | FRAMEWORK_SEARCH_PATHS = "$(inherited)"; 397 | GCC_PREPROCESSOR_DEFINITIONS = ( 398 | "DEBUG=1", 399 | "$(inherited)", 400 | ); 401 | INFOPLIST_FILE = "Localisator_Demo-swiftTests/Info.plist"; 402 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 403 | PRODUCT_BUNDLE_IDENTIFIER = "micazeve.$(PRODUCT_NAME:rfc1034identifier)"; 404 | PRODUCT_NAME = "$(TARGET_NAME)"; 405 | SWIFT_VERSION = 3.0; 406 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Localisator_Demo-swift.app/Localisator_Demo-swift"; 407 | }; 408 | name = Debug; 409 | }; 410 | 83C964101A89F7FE008D5C6D /* Release */ = { 411 | isa = XCBuildConfiguration; 412 | buildSettings = { 413 | BUNDLE_LOADER = "$(TEST_HOST)"; 414 | FRAMEWORK_SEARCH_PATHS = "$(inherited)"; 415 | INFOPLIST_FILE = "Localisator_Demo-swiftTests/Info.plist"; 416 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 417 | PRODUCT_BUNDLE_IDENTIFIER = "micazeve.$(PRODUCT_NAME:rfc1034identifier)"; 418 | PRODUCT_NAME = "$(TARGET_NAME)"; 419 | SWIFT_VERSION = 3.0; 420 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Localisator_Demo-swift.app/Localisator_Demo-swift"; 421 | }; 422 | name = Release; 423 | }; 424 | /* End XCBuildConfiguration section */ 425 | 426 | /* Begin XCConfigurationList section */ 427 | 83C963E71A89F7FD008D5C6D /* Build configuration list for PBXProject "Localisator_Demo-swift" */ = { 428 | isa = XCConfigurationList; 429 | buildConfigurations = ( 430 | 83C964091A89F7FE008D5C6D /* Debug */, 431 | 83C9640A1A89F7FE008D5C6D /* Release */, 432 | ); 433 | defaultConfigurationIsVisible = 0; 434 | defaultConfigurationName = Release; 435 | }; 436 | 83C9640B1A89F7FE008D5C6D /* Build configuration list for PBXNativeTarget "Localisator_Demo-swift" */ = { 437 | isa = XCConfigurationList; 438 | buildConfigurations = ( 439 | 83C9640C1A89F7FE008D5C6D /* Debug */, 440 | 83C9640D1A89F7FE008D5C6D /* Release */, 441 | ); 442 | defaultConfigurationIsVisible = 0; 443 | defaultConfigurationName = Release; 444 | }; 445 | 83C9640E1A89F7FE008D5C6D /* Build configuration list for PBXNativeTarget "Localisator_Demo-swiftTests" */ = { 446 | isa = XCConfigurationList; 447 | buildConfigurations = ( 448 | 83C9640F1A89F7FE008D5C6D /* Debug */, 449 | 83C964101A89F7FE008D5C6D /* Release */, 450 | ); 451 | defaultConfigurationIsVisible = 0; 452 | defaultConfigurationName = Release; 453 | }; 454 | /* End XCConfigurationList section */ 455 | }; 456 | rootObject = 83C963E41A89F7FD008D5C6D /* Project object */; 457 | } 458 | -------------------------------------------------------------------------------- /Localisator_Demo-swift/Localisator_Demo-swift.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Localisator_Demo-swift/Localisator_Demo-swift.xcodeproj/project.xcworkspace/xcshareddata/Localisator_Demo-swift.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | C6820E9A-69C8-4B66-A5E5-F6EB44AD87C1 9 | IDESourceControlProjectName 10 | Localisator_Demo-swift 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 507DDA19FB8A4E3E61000EA26CDFCCF02B55BD44 14 | https://github.com/micazeve/iOS-CustomLocalisator.git 15 | 16 | IDESourceControlProjectPath 17 | Localisator_Demo-swift/Localisator_Demo-swift.xcodeproj 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 507DDA19FB8A4E3E61000EA26CDFCCF02B55BD44 21 | ../../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/micazeve/iOS-CustomLocalisator.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 507DDA19FB8A4E3E61000EA26CDFCCF02B55BD44 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 507DDA19FB8A4E3E61000EA26CDFCCF02B55BD44 36 | IDESourceControlWCCName 37 | iOS-CustomLocalisator 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Localisator_Demo-swift/Localisator_Demo-swift.xcodeproj/xcuserdata/mazevedo.xcuserdatad/xcschemes/Localisator_Demo-swift.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 67 | 68 | 78 | 80 | 86 | 87 | 88 | 89 | 90 | 91 | 97 | 99 | 105 | 106 | 107 | 108 | 110 | 111 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /Localisator_Demo-swift/Localisator_Demo-swift.xcodeproj/xcuserdata/mazevedo.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Localisator_Demo-swift.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 83C963EB1A89F7FD008D5C6D 16 | 17 | primary 18 | 19 | 20 | 83C964001A89F7FD008D5C6D 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Localisator_Demo-swift/Localisator_Demo-swift/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Localisator_Demo-swift 4 | // 5 | // Created by Michaël Azevedo on 10/02/2015. 6 | // Copyright (c) 2015 Michaël Azevedo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(application: UIApplication) { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Localisator_Demo-swift/Localisator_Demo-swift/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /Localisator_Demo-swift/Localisator_Demo-swift/Images.xcassets/DeviceLanguage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "DeviceLanguage.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Localisator_Demo-swift/Localisator_Demo-swift/Images.xcassets/DeviceLanguage.imageset/DeviceLanguage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/micazeve/iOS-CustomLocalisator/45093c3da605e1c35487f56c6d1c98dc77b8833b/Localisator_Demo-swift/Localisator_Demo-swift/Images.xcassets/DeviceLanguage.imageset/DeviceLanguage.png -------------------------------------------------------------------------------- /Localisator_Demo-swift/Localisator_Demo-swift/Images.xcassets/English_en.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "English.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Localisator_Demo-swift/Localisator_Demo-swift/Images.xcassets/English_en.imageset/English.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/micazeve/iOS-CustomLocalisator/45093c3da605e1c35487f56c6d1c98dc77b8833b/Localisator_Demo-swift/Localisator_Demo-swift/Images.xcassets/English_en.imageset/English.png -------------------------------------------------------------------------------- /Localisator_Demo-swift/Localisator_Demo-swift/Images.xcassets/French_fr.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "French.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Localisator_Demo-swift/Localisator_Demo-swift/Images.xcassets/French_fr.imageset/French.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/micazeve/iOS-CustomLocalisator/45093c3da605e1c35487f56c6d1c98dc77b8833b/Localisator_Demo-swift/Localisator_Demo-swift/Images.xcassets/French_fr.imageset/French.png -------------------------------------------------------------------------------- /Localisator_Demo-swift/Localisator_Demo-swift/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /Localisator_Demo-swift/Localisator_Demo-swift/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Localisator_Demo-swift/Localisator_Demo-swift/LocalisatorViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LocalisatorViewController.swift 3 | // Localisator_Demo-swift 4 | // 5 | // Created by Michaël Azevedo on 10/02/2015. 6 | // Copyright (c) 2015 Michaël Azevedo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class LocalisatorViewController: UIViewController, UITableViewDataSource, UITableViewDelegate { 12 | 13 | 14 | 15 | // MARK: - Outlets 16 | @IBOutlet var tableViewLanguages: UITableView! 17 | @IBOutlet var imageViewFlag: UIImageView! 18 | @IBOutlet var labelCurrentLanguage: UILabel! 19 | @IBOutlet var labelChooseLanguage: UILabel! 20 | @IBOutlet var labelSaveLanguage: UILabel! 21 | @IBOutlet var switchSaveLanguage: UISwitch! 22 | 23 | let arrayLanguages = Localisator.sharedInstance.getArrayAvailableLanguages() 24 | 25 | // MARK: - Init methods 26 | 27 | override func viewDidLoad() { 28 | super.viewDidLoad() 29 | 30 | NotificationCenter.default.addObserver(self, selector: #selector(LocalisatorViewController.receiveLanguageChangedNotification(notification:)), name: kNotificationLanguageChanged, object: nil) 31 | 32 | switchSaveLanguage.setOn(Localisator.sharedInstance.saveInUserDefaults, animated:false) 33 | configureViewFromLocalisation() 34 | } 35 | 36 | func configureViewFromLocalisation() { 37 | title = Localization("LocalisatorViewTitle") 38 | labelCurrentLanguage.text = Localization("LocalisatorViewCurrentLanguageText") 39 | labelChooseLanguage.text = Localization("LocalisatorViewTitle") 40 | labelSaveLanguage.text = Localization("LocalisatorViewSaveText") 41 | tableViewLanguages.reloadData() 42 | imageViewFlag.image = UIImage(named:Localisator.sharedInstance.currentLanguage) 43 | } 44 | 45 | // MARK: - Notification methods 46 | 47 | func receiveLanguageChangedNotification(notification:NSNotification) { 48 | if notification.name == kNotificationLanguageChanged { 49 | configureViewFromLocalisation() 50 | } 51 | } 52 | 53 | // MARK: - Action methods 54 | 55 | @IBAction func switchValueChanged(sender: UISwitch) { 56 | if sender == switchSaveLanguage { 57 | Localisator.sharedInstance.saveInUserDefaults = switchSaveLanguage.isOn 58 | } 59 | } 60 | 61 | // MARK: - UITableViewDataSource protocol conformance 62 | 63 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 64 | return arrayLanguages.count 65 | } 66 | 67 | public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 68 | 69 | var cell = tableView.dequeueReusableCell(withIdentifier: "MyIdentifier") 70 | 71 | if cell == nil { 72 | cell = UITableViewCell(style: UITableViewCellStyle.default, reuseIdentifier: "MyIdentifier") 73 | } 74 | cell!.selectionStyle = UITableViewCellSelectionStyle.gray 75 | cell!.imageView?.image = UIImage(named:arrayLanguages[indexPath.row]) 76 | cell!.textLabel?.text = Localization(arrayLanguages[indexPath.row]) 77 | return cell! 78 | } 79 | 80 | // MARK: - UITableViewDelegateprotocol conformance 81 | 82 | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { 83 | tableView.deselectRow(at: indexPath as IndexPath, animated: true) 84 | 85 | if SetLanguage(arrayLanguages[indexPath.row]) { 86 | let alert = UIAlertView(title: nil, message: Localization("languageChangedWarningMessage"), delegate: nil, cancelButtonTitle: "OK") 87 | alert.show() 88 | } 89 | } 90 | 91 | // MARK: - Memory management 92 | 93 | deinit { 94 | NotificationCenter.default.removeObserver(self, name: kNotificationLanguageChanged, object: nil) 95 | } 96 | 97 | } 98 | -------------------------------------------------------------------------------- /Localisator_Demo-swift/Localisator_Demo-swift/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 46 | 56 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 118 | 123 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | -------------------------------------------------------------------------------- /Localisator_Demo-swift/Localisator_Demo-swift/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // Localisator_Demo-swift 4 | // 5 | // Created by Michaël Azevedo on 10/02/2015. 6 | // Copyright (c) 2015 Michaël Azevedo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | 13 | 14 | // MARK: - Outlets 15 | 16 | @IBOutlet var homeTitleLabel: UILabel! 17 | @IBOutlet var homeDescLabel: UILabel! 18 | @IBOutlet var languageButton: UIButton! 19 | 20 | // MARK: - Init methods 21 | 22 | override func viewDidLoad() { 23 | super.viewDidLoad() 24 | // Do any additional setup after loading the view, typically from a nib. 25 | 26 | title = "Localisator" 27 | 28 | NotificationCenter.default.addObserver(self, selector: #selector(ViewController.receiveLanguageChangedNotification(notification:)), name: kNotificationLanguageChanged, object: nil) 29 | 30 | configureViewFromLocalisation() 31 | } 32 | 33 | func configureViewFromLocalisation() { 34 | 35 | homeTitleLabel.text = Localization("HomeTitleText") 36 | homeDescLabel.text = Localization("HomeDescText") 37 | languageButton.setTitle(Localization("HomeButtonTitle"), for: UIControlState.normal) 38 | 39 | } 40 | 41 | // MARK: - Notification methods 42 | 43 | func receiveLanguageChangedNotification(notification:NSNotification) { 44 | if notification.name == kNotificationLanguageChanged { 45 | configureViewFromLocalisation() 46 | } 47 | } 48 | 49 | // MARK: - Memory management 50 | 51 | deinit { 52 | NotificationCenter.default.removeObserver(self, name: kNotificationLanguageChanged, object: nil) 53 | } 54 | 55 | } 56 | 57 | -------------------------------------------------------------------------------- /Localisator_Demo-swift/Localisator_Demo-swift/en.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | "DeviceLanguage" = "iDevice Language"; 2 | "English_en" = "English"; 3 | "French_fr" = "French"; 4 | 5 | "HomeTitleText" = "Welcome"; 6 | "HomeDescText" = "Localisator allow you to change your app language globally without having to restart it, and use the already existing Localizable strings."; 7 | "HomeButtonTitle" = "Choose language"; 8 | 9 | "LocalisatorViewTitle" = "Choose your language :"; 10 | "LocalisatorViewCurrentLanguageText" = "Current language :"; 11 | "LocalisatorViewTestText" = "Test labels :"; 12 | "LocalisatorViewSaveText" = "Save language :"; 13 | 14 | "languageChangedWarningMessage" = "App language just changed !"; 15 | -------------------------------------------------------------------------------- /Localisator_Demo-swift/Localisator_Demo-swift/fr.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | "DeviceLanguage" = "Langue de l'iDevice"; 2 | "English_en" = "Anglais"; 3 | "French_fr" = "Français"; 4 | 5 | "HomeTitleText" = "Bienvenue"; 6 | "HomeDescText" = "Localisator est une classe permettant de changer la langue de l'application sans avoir à la relancer, et en utilisant les fichiers de langues déjà existants."; 7 | "HomeButtonTitle" = "Choisir la langue"; 8 | 9 | "LocalisatorViewTitle" = "Choix de la langue"; 10 | "LocalisatorViewCurrentLanguageText" = "Langue actuelle :"; 11 | "LocalisatorViewTestText" = "Labels de test :"; 12 | "LocalisatorViewSaveText" = "Sauvegarder la langue :"; 13 | 14 | "languageChangedWarningMessage" = "La langue de l'application vient de changer !"; 15 | -------------------------------------------------------------------------------- /Localisator_Demo-swift/Localisator_Demo-swiftTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Localisator_Demo-swift/Localisator_Demo-swiftTests/Localisator_Demo_swiftTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Localisator_Demo_swiftTests.swift 3 | // Localisator_Demo-swiftTests 4 | // 5 | // Created by Michaël Azevedo on 10/02/2015. 6 | // Copyright (c) 2015 Michaël Azevedo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import XCTest 11 | 12 | class Localisator_Demo_swiftTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | XCTAssert(true, "Pass") 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure() { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # README 2 | 3 | Localisator is a small class you can use in order to change languages from within your iOS app, without having to restart it. It’s compatible with the localizable.strings file, so you don’t have to duplicate all your localized strings. 4 | 5 | Examples project are provided for both objective-C and Swift versions. 6 | 7 | ![Localisator](Screenshots/Screenshot1.png "Localisator")![Localisator](Screenshots/Screenshot2.png "Localisator") 8 | 9 | 10 | ###**Licence:** 11 | 12 | Localisator is under MIT Licence so you can use/modify it as you wish. Any feedback will be appreciated. 13 | I do not own any of the images in the example project : they are used only as examples. If you own any of these images and have some issues about me using your images, let me know and I will change it quickly. 14 | 15 | ###**How to use it:** 16 | 17 | If you want your interface to change when the language is changed, all your graphical classes (UIViewController for ex) must subscribe to the kNotificationLanguageChanged notification which is fired when the language is changed. 18 | 19 | This class is compatible with both old .lproj folder (ex : English) and new .lproj folder (ex : en). 20 | 21 | **Objective-C:** 22 | 23 | Add Localisator.h and Localisator.m in your project. Localisator uses ARC, if your project doesn’t use ARC, don’t forget the « -fobjc-arc » flag in your build compile phase. 24 | 25 | Replace the `NSLocalizedString(key, comment)` call by `[[Localisator sharedInstance] localizedStringForKey:key]` in your code. You can also use the `LOCALIZATION()` macro. 26 | 27 | The language must be set using `[[Localisator sharedInstance] SetLanguage(...)` 28 | 29 | **Swift:** 30 | 31 | Add Localisator.swift in your project. Call `Localization(...)` instead of `NSLocalizedString(...)`. The language must be set using `SetLanguage(...)`. 32 | 33 | 34 | 35 | Any comments are welcomed 36 | 37 | @micazeve 38 | micazeve@gmail.com 39 | 40 | -------------------------------------------------------------------------------- /Screenshots/Screenshot1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/micazeve/iOS-CustomLocalisator/45093c3da605e1c35487f56c6d1c98dc77b8833b/Screenshots/Screenshot1.png -------------------------------------------------------------------------------- /Screenshots/Screenshot2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/micazeve/iOS-CustomLocalisator/45093c3da605e1c35487f56c6d1c98dc77b8833b/Screenshots/Screenshot2.png -------------------------------------------------------------------------------- /iOS-CustomLocalisator.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "iOS-CustomLocalisator" 3 | s.version = "1.0" 4 | s.summary = "A custom localisator class which allows to change the app language without having to restart it." 5 | 6 | s.description = <<-DESC 7 | Localisator is a small class you can use in order to change languages from within your iOS app, without having to restart it. It’s compatible with the localizable.strings file, so you don’t have to duplicate all your localized strings. 8 | DESC 9 | s.homepage = "https://github.com/micazeve/iOS-CustomLocalisator" 10 | 11 | s.license = { :type => "MIT", :file => "LICENSE.md" } 12 | s.author = { "Michaël Azevedo" => "micazeve@gmail.com" } 13 | s.social_media_url = "https://twitter.com/micazeve" 14 | s.platforms = { :ios => "8.0" } 15 | 16 | s.source = { :git => "https://github.com/micazeve/iOS-CustomLocalisator.git", :branch => "master", :tag => '1.0'} 17 | s.source_files = "Localisator/*.swift" 18 | 19 | s.ios.deployment_target = '8.0' 20 | 21 | s.framework = "Foundation" 22 | s.requires_arc = true 23 | end 24 | --------------------------------------------------------------------------------