├── .gitignore ├── .travis.yml ├── AALocalizationKit.png ├── AALocalizationKit.podspec ├── AALocalizationKit ├── Assets │ └── .gitkeep └── Classes │ ├── .gitkeep │ ├── AALK+Appearance.swift │ ├── AALocalizationKit.swift │ ├── Extensions │ ├── AALK+Bundle.swift │ ├── AALK+Locale.swift │ ├── AALK+NSTextAlignment.swift │ ├── AALK+String.swift │ ├── AALK+UIButton.swift │ ├── AALK+UIFont.swift │ └── AALK+UIView.swift │ └── Support │ ├── AALK+Configuration.swift │ └── AALK+Constants.swift ├── Example ├── AALocalizationKit.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── AALocalizationKit-Example.xcscheme ├── AALocalizationKit.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── AALocalizationKit │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── LaunchScreen.xib │ │ └── Main.storyboard │ ├── English.lproj │ │ └── Localizable.strings │ ├── Extensions.swift │ ├── Images.xcassets │ │ ├── AA.imageset │ │ │ ├── 17049477.png │ │ │ └── Contents.json │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-57x57@1x.png │ │ │ ├── Icon-App-57x57@2x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-72x72@1x.png │ │ │ ├── Icon-App-72x72@2x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ ├── Icon-Small-50x50@1x.png │ │ │ └── Icon-Small-50x50@2x.png │ │ ├── Contents.json │ │ └── down_arrow.imageset │ │ │ ├── Contents.json │ │ │ └── down-arrow.png │ ├── Info.plist │ ├── Resources │ │ └── Fonts │ │ │ ├── Chibrush (Chinese) │ │ │ └── Chibrush.ttf │ │ │ ├── Jomhuria (Arabic) │ │ │ └── Jomhuria.ttf │ │ │ ├── LemonadeStand (German) │ │ │ └── LemonadeStand.ttf │ │ │ ├── MuchaFrenchCapitals (French) │ │ │ └── MuchaFrenchCapitals.ttf │ │ │ ├── Noto Serif (Japanese) │ │ │ ├── NotoSerifJP-Bold.otf │ │ │ ├── NotoSerifJP-Medium.otf │ │ │ └── NotoSerifJP-Regular.otf │ │ │ └── Roboto (English) │ │ │ ├── Roboto-Bold.ttf │ │ │ ├── Roboto-Medium.ttf │ │ │ └── Roboto-Regular.ttf │ ├── ViewController.swift │ ├── ar.lproj │ │ ├── LaunchScreen.strings │ │ ├── Localizable.strings │ │ └── Main.strings │ ├── de.lproj │ │ ├── LaunchScreen.strings │ │ ├── Localizable.strings │ │ └── Main.strings │ ├── fr.lproj │ │ ├── LaunchScreen.strings │ │ ├── Localizable.strings │ │ └── Main.strings │ ├── ja.lproj │ │ ├── LaunchScreen.strings │ │ ├── Localizable.strings │ │ └── Main.strings │ └── zh-Hans.lproj │ │ ├── LaunchScreen.strings │ │ ├── Localizable.strings │ │ └── Main.strings ├── Podfile ├── Podfile.lock ├── Pods │ ├── AAPickerView │ │ ├── AAPickerView │ │ │ └── Classes │ │ │ │ ├── AAPickerView+Helper.swift │ │ │ │ └── AAPickerView.swift │ │ ├── LICENSE │ │ └── README.md │ ├── Local Podspecs │ │ └── AALocalizationKit.podspec.json │ ├── Manifest.lock │ ├── Pods.xcodeproj │ │ └── project.pbxproj │ └── Target Support Files │ │ ├── AALocalizationKit │ │ ├── AALocalizationKit-Info.plist │ │ ├── AALocalizationKit-dummy.m │ │ ├── AALocalizationKit-prefix.pch │ │ ├── AALocalizationKit-umbrella.h │ │ ├── AALocalizationKit.debug.xcconfig │ │ ├── AALocalizationKit.modulemap │ │ ├── AALocalizationKit.release.xcconfig │ │ └── AALocalizationKit.xcconfig │ │ ├── AAPickerView │ │ ├── AAPickerView-Info.plist │ │ ├── AAPickerView-dummy.m │ │ ├── AAPickerView-prefix.pch │ │ ├── AAPickerView-umbrella.h │ │ ├── AAPickerView.debug.xcconfig │ │ ├── AAPickerView.modulemap │ │ ├── AAPickerView.release.xcconfig │ │ └── AAPickerView.xcconfig │ │ └── Pods-AALocalizationKit_Example │ │ ├── Pods-AALocalizationKit_Example-Info.plist │ │ ├── Pods-AALocalizationKit_Example-acknowledgements.markdown │ │ ├── Pods-AALocalizationKit_Example-acknowledgements.plist │ │ ├── Pods-AALocalizationKit_Example-dummy.m │ │ ├── Pods-AALocalizationKit_Example-frameworks.sh │ │ ├── Pods-AALocalizationKit_Example-umbrella.h │ │ ├── Pods-AALocalizationKit_Example.debug.xcconfig │ │ ├── Pods-AALocalizationKit_Example.modulemap │ │ └── Pods-AALocalizationKit_Example.release.xcconfig └── Tests │ ├── Info.plist │ └── Tests.swift ├── LICENSE ├── README.md ├── Screenshots ├── Demo.gif └── Demo.png └── _Pods.xcodeproj /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | build/ 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata/ 15 | *.xccheckout 16 | profile 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | 22 | # Bundler 23 | .bundle 24 | 25 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 26 | # Carthage/Checkouts 27 | 28 | Carthage/Build 29 | 30 | # We recommend against adding the Pods directory to your .gitignore. However 31 | # you should judge for yourself, the pros and cons are mentioned at: 32 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 33 | # 34 | # Note: if you ignore the Pods directory, make sure to uncomment 35 | # `pod install` in .travis.yml 36 | # 37 | # Pods/ 38 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # references: 2 | # * https://www.objc.io/issues/6-build-tools/travis-ci/ 3 | # * https://github.com/supermarin/xcpretty#usage 4 | 5 | osx_image: xcode7.3 6 | language: objective-c 7 | # cache: cocoapods 8 | # podfile: Example/Podfile 9 | # before_install: 10 | # - gem install cocoapods # Since Travis is not always on latest version 11 | # - pod install --project-directory=Example 12 | script: 13 | - set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/AALocalizationKit.xcworkspace -scheme AALocalizationKit-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty 14 | - pod lib lint 15 | -------------------------------------------------------------------------------- /AALocalizationKit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngrAhsanAli/AALocalizationKit/1133981a974e3e836c1891fcc7753df102a18129/AALocalizationKit.png -------------------------------------------------------------------------------- /AALocalizationKit.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint AALocalizationKit.podspec' to ensure this is a 3 | # valid spec before submitting. 4 | # 5 | # Any lines starting with a # are optional, but their use is encouraged 6 | # To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | s.name = 'AALocalizationKit' 11 | s.version = '1.5.1' 12 | s.summary = 'AALocalizationKit is a great localization manager that is written in pure swift.' 13 | 14 | # This description is used to generate tags and improve search results. 15 | # * Think: What does it do? Why did you write it? What is the focus? 16 | # * Try to keep it short, snappy and to the point. 17 | # * Write the description between the DESC delimiters below. 18 | # * Finally, don't worry about the indent, CocoaPods strips it! 19 | 20 | s.description = <<-DESC 21 | AALocalizationKit is really helpful to maintain multiple languages in the application with their custom language fonts and an ability to change the language within your application! With this, you can easily configured framework to configure multiple languages in the iOS application. 22 | DESC 23 | 24 | s.homepage = 'https://github.com/EngrAhsanAli/AALocalizationKit' 25 | # s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2' 26 | s.license = { :type => 'MIT', :file => 'LICENSE' } 27 | s.author = { 'EngrAhsanAli' => 'hafiz.m.ahsan.ali@gmail.com' } 28 | s.source = { :git => 'https://github.com/EngrAhsanAli/AALocalizationKit.git', :tag => s.version.to_s } 29 | # s.social_media_url = 'https://twitter.com/' 30 | 31 | s.ios.deployment_target = '9.0' 32 | s.swift_version = '5.0' 33 | s.source_files = 'AALocalizationKit/Classes/**/*' 34 | 35 | # s.resource_bundles = { 36 | # 'AALocalizationKit' => ['AALocalizationKit/Assets/*.png'] 37 | # } 38 | 39 | # s.public_header_files = 'Pod/Classes/**/*.h' 40 | # s.frameworks = 'UIKit', 'MapKit' 41 | # s.dependency 'AFNetworking', '~> 2.3' 42 | end 43 | -------------------------------------------------------------------------------- /AALocalizationKit/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngrAhsanAli/AALocalizationKit/1133981a974e3e836c1891fcc7753df102a18129/AALocalizationKit/Assets/.gitkeep -------------------------------------------------------------------------------- /AALocalizationKit/Classes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngrAhsanAli/AALocalizationKit/1133981a974e3e836c1891fcc7753df102a18129/AALocalizationKit/Classes/.gitkeep -------------------------------------------------------------------------------- /AALocalizationKit/Classes/AALK+Appearance.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AALK+Appearance.swift 3 | // AALocalizationKit 4 | // 5 | // Created by Muhammad Ahsan Ali on 2020/11/07. 6 | // 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions: 14 | // 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | // THE SOFTWARE. 25 | 26 | import UIKit 27 | 28 | extension AALocalizationKit { 29 | 30 | func setLabelApperance(of appearance: AALK_Configuration.UpdateOptions) { 31 | let config = configuration 32 | let container = appearance.container 33 | let instance = (container.count > 0) ? 34 | UILabel.appearance(whenContainedInInstancesOf: container) : 35 | UILabel.appearance() 36 | 37 | if appearance.alignment { instance.aalkChangeAllignment = config } 38 | if appearance.font { instance.aalkChangeFont = config } 39 | if appearance.localize { instance.aalkChangeText = config } 40 | 41 | } 42 | 43 | func setTextFieldApperance(of appearance: AALK_Configuration.UpdateOptions) { 44 | let config = configuration 45 | let container = appearance.container 46 | let instance = (container.count > 0) ? 47 | UITextField.appearance(whenContainedInInstancesOf: container) : 48 | UITextField.appearance() 49 | 50 | if appearance.alignment { instance.aalkChangeAllignment = config } 51 | if appearance.font { instance.aalkChangeFont = config } 52 | if appearance.localize { instance.aalkChangeText = config } 53 | 54 | } 55 | 56 | func setSearchFieldApperance(of appearance: AALK_Configuration.UpdateOptions) { 57 | let config = configuration 58 | let container = appearance.container 59 | let instance = (container.count > 0) ? 60 | UISearchBar.appearance(whenContainedInInstancesOf: container) : 61 | UISearchBar.appearance() 62 | 63 | if appearance.alignment { instance.aalkChangeAllignment = config } 64 | if appearance.font { instance.aalkChangeFont = config } 65 | if appearance.localize { instance.aalkChangeText = config } 66 | 67 | } 68 | 69 | func setButtonApperance(of appearance: AALK_Configuration.UpdateOptions) { 70 | let config = configuration 71 | let container = appearance.container 72 | let instance = (container.count > 0) ? 73 | UIButton.appearance(whenContainedInInstancesOf: container) : 74 | UIButton.appearance() 75 | 76 | if appearance.alignment { instance.aalkChangeAllignment = config } 77 | if appearance.font { instance.aalkChangeFont = config } 78 | if appearance.localize { instance.aalkChangeText = config } 79 | 80 | } 81 | 82 | func setTextViewApperance(of appearance: AALK_Configuration.UpdateOptions) { 83 | let config = configuration 84 | let container = appearance.container 85 | let instance = (container.count > 0) ? 86 | UITextView.appearance(whenContainedInInstancesOf: container) : 87 | UITextView.appearance() 88 | 89 | if appearance.alignment { instance.aalkChangeAllignment = config } 90 | if appearance.font { instance.aalkChangeFont = config } 91 | if appearance.localize { instance.aalkChangeText = config } 92 | 93 | } 94 | 95 | func setSegmentedControlApperance(of appearance: AALK_Configuration.UpdateOptions) { 96 | let config = configuration 97 | let container = appearance.container 98 | let instance = (container.count > 0) ? 99 | UISegmentedControl.appearance(whenContainedInInstancesOf: container) : 100 | UISegmentedControl.appearance() 101 | 102 | // if appearance.alignment { } // TODO 103 | if appearance.font { instance.aalkChangeFont = config } 104 | if appearance.localize { instance.aalkChangeText = config } 105 | 106 | } 107 | 108 | } 109 | 110 | fileprivate extension UILabel { 111 | 112 | @objc var aalkChangeAllignment: AALK_Configuration { 113 | get { fatalError() } 114 | set { textAlignment.aalk_setAllignment() } 115 | } 116 | 117 | @objc var aalkChangeText: AALK_Configuration { 118 | get { fatalError() } 119 | set { 120 | guard let text = newValue.localizedString(text) else { return } 121 | self.text = text 122 | } 123 | } 124 | 125 | @objc var aalkChangeFont: AALK_Configuration { 126 | get { fatalError() } 127 | set { font = newValue.setLanguageFont(font) } 128 | } 129 | } 130 | 131 | fileprivate extension UITextField { 132 | 133 | @objc var aalkChangeAllignment: AALK_Configuration { 134 | get { fatalError() } 135 | set { textAlignment.aalk_setAllignment() } 136 | } 137 | 138 | @objc var aalkChangeText: AALK_Configuration { 139 | get { fatalError() } 140 | set { 141 | if let text = newValue.localizedString(text) { self.text = text } 142 | if let placeholder = newValue.localizedString(placeholder) { self.placeholder = placeholder } 143 | } 144 | } 145 | 146 | @objc var aalkChangeFont: AALK_Configuration { 147 | get { fatalError() } 148 | set { font = newValue.setLanguageFont(font) } 149 | } 150 | } 151 | 152 | fileprivate extension UISearchBar { 153 | 154 | @objc var aalkChangeAllignment: AALK_Configuration { 155 | get { fatalError() } 156 | set { aa_textField.textAlignment.aalk_setAllignment() } 157 | } 158 | 159 | @objc var aalkChangeText: AALK_Configuration { 160 | get { fatalError() } 161 | set { 162 | if let text = newValue.localizedString(text) { self.text = text } 163 | if let placeholder = newValue.localizedString(placeholder) { self.placeholder = placeholder } 164 | } 165 | } 166 | 167 | @objc var aalkChangeFont: AALK_Configuration { 168 | get { fatalError() } 169 | set { aa_textField.font = newValue.setLanguageFont(aa_textField.font) } 170 | } 171 | } 172 | 173 | fileprivate extension UITextView { 174 | 175 | @objc var aalkChangeAllignment: AALK_Configuration { 176 | get { fatalError() } 177 | set { textAlignment.aalk_setAllignment() } 178 | } 179 | 180 | @objc var aalkChangeText: AALK_Configuration { 181 | get { fatalError() } 182 | set { 183 | guard let text = newValue.localizedString(text) else { return } 184 | self.text = text 185 | } 186 | } 187 | 188 | @objc var aalkChangeFont: AALK_Configuration { 189 | get { fatalError() } 190 | set { font = newValue.setLanguageFont(font) } 191 | } 192 | } 193 | 194 | fileprivate extension UIButton { 195 | 196 | @objc var aalkChangeAllignment: AALK_Configuration { 197 | get { fatalError() } 198 | set { titleLabel?.textAlignment.aalk_setAllignment() } 199 | } 200 | 201 | @objc var aalkChangeText: AALK_Configuration { 202 | get { fatalError() } 203 | set { 204 | if let text = newValue.localizedString(title(for: .normal)) { setTitle(text, for: .normal) } 205 | if let text = newValue.localizedString(title(for: .selected)) { setTitle(text, for: .selected) } 206 | } 207 | } 208 | 209 | @objc var aalkChangeFont: AALK_Configuration { 210 | get { fatalError() } 211 | set { titleLabel?.font = newValue.setLanguageFont(titleLabel?.font) } 212 | } 213 | } 214 | 215 | fileprivate extension UISegmentedControl { 216 | 217 | @objc var aalkChangeAllignment: AALK_Configuration { 218 | get { fatalError() } 219 | set { } // TODO 220 | } 221 | 222 | @objc var aalkChangeText: AALK_Configuration { 223 | get { fatalError() } 224 | set { } // TODO 225 | } 226 | 227 | @objc var aalkChangeFont: AALK_Configuration { 228 | get { fatalError() } 229 | set { 230 | let normalFont = titleTextAttributes(for: .normal)?[.font] as? UIFont 231 | let selectedFont = titleTextAttributes(for: .selected)?[.font] as? UIFont 232 | let _normalFont = newValue.setLanguageFont(normalFont ?? UIFont.systemFont(ofSize: newValue.sizeSegmentedControl)) 233 | let _selectedFont = newValue.setLanguageFont(selectedFont ?? UIFont.systemFont(ofSize: newValue.sizeSegmentedControl)) 234 | setTitleTextAttributes([NSAttributedString.Key.font: _normalFont as Any], for: .normal) 235 | setTitleTextAttributes([NSAttributedString.Key.font: _selectedFont as Any], for: .selected) 236 | } 237 | } 238 | } 239 | -------------------------------------------------------------------------------- /AALocalizationKit/Classes/AALocalizationKit.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AALocalizationKit.swift 3 | // AALocalizationKit 4 | // 5 | // Created by Engr. Ahsan Ali on 22/10/2019. 6 | // Copyright (c) 2017 AA-Creations. All rights reserved. 7 | // 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | import UIKit 28 | 29 | // MARK:- AALocalizationKit 30 | public class AALocalizationKit { 31 | 32 | /// Singleton a.k.a AALK 33 | public static let shared: AALocalizationKit = AALocalizationKit() 34 | 35 | /// AALK configurations Singleton 36 | public var configuration = AALK_Configuration() 37 | 38 | init() { 39 | let langCode = Locale.current.languageCode ?? "en" 40 | defaultLanguage = AALanguage(rawValue: langCode) ?? .en 41 | } 42 | 43 | /// Getter/Setter for current Language in the application, default is English language 44 | public var currentLanguage: AALanguage { 45 | get { 46 | guard let currentLang = DefaultKeys.selectedLanguageKey.get else { 47 | print("AALocalizationKit:- Setting English as current language") 48 | return .en 49 | } 50 | return AALanguage(rawValue: currentLang) ?? .en 51 | } 52 | set { 53 | DefaultKeys.selectedLanguageKey.set(value: newValue) 54 | 55 | UIView.appearance().semanticContentAttribute = newValue.isRightToLeft ? .forceRightToLeft : .forceLeftToRight 56 | 57 | } 58 | } 59 | 60 | /// Getter/Setter for default language in the application, default is English language 61 | public var defaultLanguage: AALanguage { 62 | get { 63 | guard let defaultLanguage = DefaultKeys.defaultLanguageKey.get else { 64 | print("AALocalizationKit:- Setting English as default language") 65 | return .en 66 | } 67 | return AALanguage(rawValue: defaultLanguage) ?? .en 68 | } 69 | set { 70 | 71 | if DefaultKeys.defaultLanguageKey.get == nil { 72 | 73 | DefaultKeys.defaultLanguageKey.set(value: newValue) 74 | DefaultKeys.selectedLanguageKey.set(value: newValue) 75 | 76 | currentLanguage = newValue 77 | } 78 | 79 | } 80 | } 81 | 82 | /// Current language string 83 | var currentLanguageString: String { 84 | AALK.currentLanguage.rawValue 85 | } 86 | 87 | /// Getter for all fonts 88 | public var languageFonts: [AALanguage : [UIFont.Weight : String]] { 89 | AALK.configuration.languageFont 90 | } 91 | 92 | /// Getter for language semantic content attribute either right to left or not 93 | public var isRightToLeft: Bool { 94 | currentLanguage.isRightToLeft 95 | } 96 | 97 | /// Get the current application Locale 98 | public var appLocale: Locale { 99 | Locale(identifier: currentLanguage.rawValue) 100 | } 101 | 102 | /// Get all configured languages in the application's main bundle 103 | public var bundleLanguages: [String] { 104 | var languages = Bundle.main.localizations 105 | if let indexOfBase = languages.firstIndex(of: "Base") { 106 | languages.remove(at: indexOfBase) 107 | } 108 | return languages 109 | } 110 | 111 | /// Get all configured languages in the application's main bundle 112 | public var bundleLanguageNames: [String] { 113 | bundleLanguages.compactMap { 114 | Locale.aalk_languageName(from: $0) 115 | } 116 | } 117 | 118 | 119 | /// Get all available languages in the main bundle of the application 120 | public var languages: [AALanguage] { 121 | bundleLanguages.compactMap { 122 | AALanguage(rawValue: $0) 123 | } 124 | } 125 | 126 | /// Set New Language with animation 127 | /// - Parameters: 128 | /// - language: language to set 129 | /// - windows: window of the app 130 | /// - viewController: root view controller 131 | /// - animation: animation block 132 | public func setLanguage(language: AALanguage, 133 | for windows: [(UIWindow?, String?)]? = nil, 134 | viewController: ((String?) -> UIViewController)? = nil, 135 | animation: ((UIView) -> Void)? = nil) { 136 | 137 | AALK.currentLanguage = language 138 | guard let viewController = viewController else { return } 139 | 140 | var windowsToChange: [(UIWindow?, String?)]? 141 | if let windows = windows { 142 | windowsToChange = windows 143 | } else { 144 | if #available(iOS 13.0, *) { 145 | windowsToChange = UIApplication.shared.connectedScenes 146 | .compactMap({$0 as? UIWindowScene}) 147 | .map({ ($0.windows.first, $0.title) }) 148 | } else { 149 | windowsToChange = [(UIApplication.shared.keyWindow, nil)] 150 | } 151 | } 152 | 153 | windowsToChange?.forEach({ windowAndTitle in 154 | 155 | let (window, title) = windowAndTitle 156 | let rootViewController = viewController(title) 157 | 158 | guard let snapshot = window?.snapshotView(afterScreenUpdates: true) else { 159 | return 160 | } 161 | rootViewController.view.addSubview(snapshot); 162 | 163 | window?.rootViewController = rootViewController 164 | 165 | UIView.animate(withDuration: 0.5, animations: { 166 | animation?(snapshot) 167 | self.setApperance() 168 | }) { _ in 169 | snapshot.removeFromSuperview() 170 | } 171 | 172 | }) 173 | 174 | } 175 | 176 | public func setApperance() { 177 | configuration.appearanceElements.forEach { 178 | switch $0 { 179 | case .label(let m): setLabelApperance(of: m) 180 | case .textField(let m): setTextFieldApperance(of: m) 181 | case .textView(let m): setTextViewApperance(of: m) 182 | case .button(let m): setButtonApperance(of: m) 183 | case .segmentedControl(let m): setSegmentedControlApperance(of: m) 184 | case .searchField(let m): setSearchFieldApperance(of: m) 185 | 186 | } 187 | } 188 | } 189 | 190 | } 191 | -------------------------------------------------------------------------------- /AALocalizationKit/Classes/Extensions/AALK+Bundle.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AALK+Bundle.swift 3 | // AALocalizationKit 4 | // 5 | // Created by Muhammad Ahsan Ali on 2021/04/03. 6 | // 7 | 8 | import Foundation 9 | 10 | public extension Bundle { 11 | 12 | /// Find translations from given bundle and current language 13 | /// - Parameter fileName: local strings fileName 14 | /// - Returns: Dictionary of localizations 15 | func aalk_findLocalization(fileName: String, 16 | withExtension: String = "strings") -> [String: String] { 17 | let fileName = "\(fileName)\(AALK.currentLanguage.rawValue)" 18 | let localizedPath = url(forResource: fileName, withExtension: withExtension)! 19 | return NSDictionary(contentsOf: localizedPath)! as! [String : String] 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /AALocalizationKit/Classes/Extensions/AALK+Locale.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AALK+Locale.swift 3 | // AALocalizationKit 4 | // 5 | // Created by Engr. Ahsan Ali on 22/10/2019. 6 | // Copyright (c) 2017 AA-Creations. All rights reserved. 7 | // 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | // MARK:- Locale for App 28 | public extension Locale { 29 | 30 | /// Returns the language display name 31 | /// - Parameter identifier: language identifier 32 | static func aalk_languageName(from identifier: String) -> String { 33 | NSLocale(localeIdentifier: identifier).displayName(forKey: .identifier , value: identifier) ?? identifier 34 | } 35 | 36 | func aalk_setCurrentLanguage() { 37 | guard let lang = AALanguage(rawValue: identifier) else { return } 38 | AALK.currentLanguage = lang 39 | } 40 | 41 | static var aalk_isRightToLeft: Bool { AALK.isRightToLeft } 42 | 43 | static var aalk_language: String { AALK.currentLanguage.rawValue } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /AALocalizationKit/Classes/Extensions/AALK+NSTextAlignment.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AALK+NSTextAlignment.swift 3 | // AALocalizationKit 4 | // 5 | // Created by Engr. Ahsan Ali on 22/10/2019. 6 | // Copyright (c) 2017 AA-Creations. All rights reserved. 7 | // 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | // MARK: - NSTextAlignment extension for AALK 28 | extension NSTextAlignment { 29 | 30 | /// Set character direction for languages supporting left and right directions 31 | public mutating func aalk_setAllignment() { 32 | guard self != .center && self != .natural && self != .justified else { return } 33 | self = AALK.isRightToLeft ? .right : .left 34 | } 35 | 36 | /// Set character direction for languages supporting left and right directions 37 | public mutating func aalk_setInverseAllignment() { 38 | self = !AALK.isRightToLeft ? .right : .left 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /AALocalizationKit/Classes/Extensions/AALK+String.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AALK+String.swift 3 | // AALocalizationKit 4 | // 5 | // Created by Muhammad Ahsan Ali on 2021/03/28. 6 | // 7 | // 8 | // Permission is hereby granted, free of charge, to any person obtaining a copy 9 | // of this software and associated documentation files (the "Software"), to deal 10 | // in the Software without restriction, including without limitation the rights 11 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | // copies of the Software, and to permit persons to whom the Software is 13 | // furnished to do so, subject to the following conditions: 14 | // 15 | // The above copyright notice and this permission notice shall be included in 16 | // all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | // THE SOFTWARE. 25 | 26 | import Foundation 27 | 28 | public extension String { 29 | 30 | mutating func aalk_prepend(_ string: String, spacing: Int = 1) { 31 | let spacing = String(repeating: " ", count: spacing) 32 | if AALK.isRightToLeft { append(spacing + string + spacing) } 33 | else { insert(contentsOf: spacing + string + spacing, at: string.startIndex) } 34 | } 35 | 36 | mutating func aalk_append(_ string: String, spacing: Int = 1) { 37 | let spacing = String(repeating: " ", count: spacing) 38 | if !AALK.isRightToLeft { append(spacing + string + spacing) } 39 | else { insert(contentsOf: spacing + string + spacing, at: string.startIndex) } 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /AALocalizationKit/Classes/Extensions/AALK+UIButton.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AALK+UIButton.swift 3 | // AALocalizationKit 4 | // 5 | // Created by Muhammad Ahsan Ali on 2021/04/03. 6 | // 7 | 8 | import UIKit 9 | 10 | // MARK: - UIButton extension for AALK 11 | public extension UIButton { 12 | 13 | /// Set character direction for languages supporting left and right directions 14 | func aalk_setHorizontalAllignment() { 15 | guard contentHorizontalAlignment == .left || contentHorizontalAlignment == .right else { return } 16 | contentHorizontalAlignment = AALK.isRightToLeft ? .right : .left 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /AALocalizationKit/Classes/Extensions/AALK+UIFont.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AALocalizationKit+UIFont.swift 3 | // AALocalizationKit 4 | // 5 | // Created by Engr. Ahsan Ali on 22/10/2019. 6 | // Copyright (c) 2017 AA-Creations. All rights reserved. 7 | // 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | // MARK: - UIFont extension for AALK 28 | extension UIFont { 29 | 30 | /// Gets the UIFont weight from traits 31 | var weight: UIFont.Weight { 32 | guard let weightNumber = traits[.weight] as? NSNumber else { return .regular } 33 | let weightRawValue = CGFloat(weightNumber.doubleValue) 34 | let weight = UIFont.Weight(rawValue: weightRawValue) 35 | return weight 36 | } 37 | 38 | /// Gets the traits from font descriptor property of UIFont 39 | var traits: [UIFontDescriptor.TraitKey: Any] { 40 | fontDescriptor.object(forKey: .traits) as? [UIFontDescriptor.TraitKey: Any] 41 | ?? [:] 42 | } 43 | 44 | // Setting it for better time complexity 45 | func font(withName name: String) -> UIFont { 46 | UIFont(name: name, size: fontDescriptor.pointSize) ?? self 47 | } 48 | 49 | public convenience init(aalk weight: UIFont.Weight, pointSize: CGFloat) { 50 | let fontName = (AALK.languageFonts[AALK.currentLanguage]?[weight]) ?? "Helvetica" 51 | self.init(name: fontName, size: pointSize)! 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /AALocalizationKit/Classes/Extensions/AALK+UIView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AALocalizationKit+UIView.swift 3 | // AALocalizationKit 4 | // 5 | // Created by Engr. Ahsan Ali on 22/10/2019. 6 | // Copyright (c) 2017 AA-Creations. All rights reserved. 7 | // 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | // MARK: - IBDesignable UIView for App 28 | @IBDesignable 29 | public extension UIView { 30 | 31 | /// Change the view direction to flip for characters direction is right to left 32 | @IBInspectable var AALocalizeDirection: Bool { 33 | set { 34 | guard AALK.isRightToLeft else { return } 35 | transform = CGAffineTransform(scaleX: -1, y: 1) 36 | } 37 | get { AALK.isRightToLeft } 38 | } 39 | } 40 | 41 | @IBDesignable 42 | public extension UILabel { 43 | 44 | /// Change the view direction to flip for characters direction is right to left 45 | @IBInspectable override var AALocalizeDirection: Bool { 46 | set { 47 | guard AALK.isRightToLeft else { return } 48 | textAlignment = .right 49 | } 50 | get { AALK.isRightToLeft } 51 | } 52 | } 53 | 54 | 55 | 56 | extension UISearchBar { 57 | 58 | /// Returns the`UITextField` that is placed inside the text field. 59 | var aa_textField: UITextField { 60 | if #available(iOS 13, *) { return searchTextField } 61 | else { return value(forKey: "_searchField") as! UITextField } 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /AALocalizationKit/Classes/Support/AALK+Configuration.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AALK+Configuration.swift 3 | // AALocalizationKit 4 | // 5 | // Created by Engr. Ahsan Ali on 22/10/2019. 6 | // Copyright (c) 2017 AA-Creations. All rights reserved. 7 | // 8 | 9 | // MARK:- AALK_Configuration 10 | @objc public class AALK_Configuration: NSObject { 11 | public override init() {} 12 | 13 | @objc public class UpdateOptions: NSObject { 14 | public var font: Bool = true 15 | public var alignment: Bool = true 16 | public var localize: Bool = true 17 | public var container: [UIAppearanceContainer.Type] = [] 18 | } 19 | 20 | public enum UI_Elems { 21 | case label(UpdateOptions), 22 | searchField(UpdateOptions), 23 | textField(UpdateOptions), 24 | textView(UpdateOptions), 25 | button(UpdateOptions), 26 | segmentedControl(UpdateOptions) 27 | } 28 | 29 | /// Default font family for default language of the application 30 | public var defaultFont: String = "GillSans" 31 | 32 | /// Fonts those should not override 33 | public var exceptions = Set() 34 | 35 | /// Collection of languages and their respective font weights and font families 36 | public var languageFont: [AALanguage: [UIFont.Weight: String]] = [:] 37 | 38 | /// UISegmentedControl size 39 | public var sizeSegmentedControl: CGFloat = 25 40 | 41 | public var localizationBundle: Bundle = .main 42 | 43 | public var appearanceElements: [UI_Elems] = [.label(UpdateOptions()), 44 | .button(UpdateOptions()), 45 | .searchField(UpdateOptions()), 46 | .textField(UpdateOptions()), 47 | .textView(UpdateOptions())] 48 | 49 | } 50 | 51 | extension AALK_Configuration { 52 | 53 | func localizedString(_ key: String?) -> String? { 54 | guard let text = key, 55 | let bundlePath = localizationBundle.path(forResource: AALK.currentLanguageString, ofType: "lproj") else { return nil } 56 | let bundle = Bundle(path: bundlePath)! 57 | return bundle.localizedString(forKey: text, value: nil, table: nil) 58 | } 59 | 60 | /// Get the provided language font 61 | /// Font files against font weights should be input while application starts 62 | /// This will consider the default font with regular font weight if no custom font was provided by the user 63 | func setLanguageFont(_ font: UIFont?) -> UIFont? { 64 | guard let _font = font else { return nil } 65 | if let fontName = languageFont[AALK.currentLanguage]?[_font.weight] { 66 | if exceptions.contains(_font.fontName) { 67 | return _font 68 | } 69 | return _font.font(withName: fontName) 70 | } 71 | return _font.font(withName: defaultFont) 72 | } 73 | 74 | } 75 | -------------------------------------------------------------------------------- /AALocalizationKit/Classes/Support/AALK+Constants.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AALocalizationKit+Constants.swift 3 | // AALocalizationKit 4 | // 5 | // Created by Engr. Ahsan Ali on 22/10/2019. 6 | // Copyright (c) 2017 AA-Creations. All rights reserved. 7 | // 8 | 9 | 10 | // MARK: - Constants 11 | public let AALK = AALocalizationKit.shared 12 | 13 | // MARK: - DefaultKeys for User Default keys 14 | enum DefaultKeys: String { 15 | case selectedLanguageKey = "AALocalizationKitSelectedLanguage" 16 | case defaultLanguageKey = "AALocalizationKitDefaultLanguage" 17 | case unlocalizedKey = "" 18 | 19 | /// Get the string value from user defaults for given key 20 | var get: String? { UserDefaults.standard.string(forKey: rawValue) } 21 | 22 | /// Set the string value from user defaults for given key 23 | /// - Parameter value: New Value 24 | func set(value: AALanguage) { UserDefaults.standard.set(value.rawValue, forKey: rawValue) } 25 | 26 | } 27 | 28 | 29 | // MARK: - AALanguage for language codes 30 | public enum AALanguage: String { 31 | case enGB = "en-GB" 32 | case enAU = "en-AU" 33 | case enCA = "en-CA" 34 | case enIN = "en-IN" 35 | case frCA = "fr-CA" 36 | case esMX = "es-MX" 37 | case ptBR = "pt-BR" 38 | case zhHans = "zh-Hans" 39 | case zhHant = "zh-Hant" 40 | case zhHK = "zh-HK" 41 | case es419 = "es-419" 42 | case ptPT = "pt-PT" 43 | case deviceLanguage 44 | case ar,en,nl,ja,ko,vi,ru,sv,fr,es,pt,it,de,da,fi,nb,tr,el,id, 45 | ms,th,hi,hu,pl,cs,sk,uk,hr,ca,ro,he,ur,fa,ku,arc,sl,ml 46 | 47 | /// Check the characters direction for current language 48 | var isRightToLeft: Bool { Locale.characterDirection(forLanguage: rawValue) == .rightToLeft } 49 | } 50 | -------------------------------------------------------------------------------- /Example/AALocalizationKit.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 413C62502607D5E0006F2113 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 413C62522607D5E0006F2113 /* Localizable.strings */; }; 11 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; }; 12 | 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD71AFB9204008FA782 /* ViewController.swift */; }; 13 | 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; }; 14 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; 15 | 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; 16 | 702E0C7EB1E05D68D25C7F8C /* Pods_AALocalizationKit_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 79163811543E7FE6B6B28D94 /* Pods_AALocalizationKit_Example.framework */; }; 17 | 8F6CC284237FEEC7005184E4 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F6CC283237FEEC7005184E4 /* Extensions.swift */; }; 18 | 8FF9504C239D608E00856085 /* MuchaFrenchCapitals.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 8FF95047239D608E00856085 /* MuchaFrenchCapitals.ttf */; }; 19 | 8FF9504D239D608E00856085 /* Chibrush.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 8FF95049239D608E00856085 /* Chibrush.ttf */; }; 20 | 8FF9504E239D608E00856085 /* LemonadeStand.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 8FF9504B239D608E00856085 /* LemonadeStand.ttf */; }; 21 | 8FF95066239D64F900856085 /* Roboto-Medium.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 8FF95050239D64F800856085 /* Roboto-Medium.ttf */; }; 22 | 8FF95068239D64F900856085 /* Roboto-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 8FF95052239D64F800856085 /* Roboto-Regular.ttf */; }; 23 | 8FF9506F239D64F900856085 /* Roboto-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 8FF95059239D64F800856085 /* Roboto-Bold.ttf */; }; 24 | 8FF95072239D64F900856085 /* NotoSerifJP-Bold.otf in Resources */ = {isa = PBXBuildFile; fileRef = 8FF9505D239D64F800856085 /* NotoSerifJP-Bold.otf */; }; 25 | 8FF95073239D64F900856085 /* NotoSerifJP-Medium.otf in Resources */ = {isa = PBXBuildFile; fileRef = 8FF9505E239D64F800856085 /* NotoSerifJP-Medium.otf */; }; 26 | 8FF95076239D64F900856085 /* NotoSerifJP-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = 8FF95061239D64F800856085 /* NotoSerifJP-Regular.otf */; }; 27 | 8FF95079239D64F900856085 /* Jomhuria.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 8FF95065239D64F800856085 /* Jomhuria.ttf */; }; 28 | /* End PBXBuildFile section */ 29 | 30 | /* Begin PBXFileReference section */ 31 | 0DBDD3241A514C3E03130AA3 /* Pods-AALocalizationKit_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AALocalizationKit_Tests.release.xcconfig"; path = "Target Support Files/Pods-AALocalizationKit_Tests/Pods-AALocalizationKit_Tests.release.xcconfig"; sourceTree = ""; }; 32 | 1179C07E694F503103CAE559 /* Pods-AALocalizationKit_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AALocalizationKit_Example.debug.xcconfig"; path = "Target Support Files/Pods-AALocalizationKit_Example/Pods-AALocalizationKit_Example.debug.xcconfig"; sourceTree = ""; }; 33 | 323A797AC12F8B0ACDE279D0 /* Pods-AALocalizationKit_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AALocalizationKit_Example.release.xcconfig"; path = "Target Support Files/Pods-AALocalizationKit_Example/Pods-AALocalizationKit_Example.release.xcconfig"; sourceTree = ""; }; 34 | 3DBF15E3C87A818B1C0D9C06 /* Pods_AALocalizationKit_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_AALocalizationKit_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 35 | 413C62512607D5E0006F2113 /* English */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/Localizable.strings; sourceTree = ""; }; 36 | 413C62542607D5E9006F2113 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/Localizable.strings; sourceTree = ""; }; 37 | 413C62552607D5EA006F2113 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = ""; }; 38 | 413C62562607D5EB006F2113 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = ""; }; 39 | 413C62572607D5ED006F2113 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = ""; }; 40 | 413C62582607D5EE006F2113 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Localizable.strings; sourceTree = ""; }; 41 | 607FACD01AFB9204008FA782 /* AALocalizationKit_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AALocalizationKit_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 43 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 44 | 607FACD71AFB9204008FA782 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 45 | 607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 46 | 607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 47 | 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 48 | 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 49 | 607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = ""; }; 50 | 79163811543E7FE6B6B28D94 /* Pods_AALocalizationKit_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_AALocalizationKit_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 51 | 8E146012D3AD58C9401A1F64 /* AALocalizationKit.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = AALocalizationKit.podspec; path = ../AALocalizationKit.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 52 | 8F6CC283237FEEC7005184E4 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; 53 | 8F6CC295238029F6005184E4 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Main.strings; sourceTree = ""; }; 54 | 8F6CC296238029F6005184E4 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/LaunchScreen.strings; sourceTree = ""; }; 55 | 8F6CC29723802A07005184E4 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/Main.strings; sourceTree = ""; }; 56 | 8F6CC29823802A07005184E4 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/LaunchScreen.strings; sourceTree = ""; }; 57 | 8F6CC29923802CA1005184E4 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Main.strings; sourceTree = ""; }; 58 | 8F6CC29A23802CA1005184E4 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/LaunchScreen.strings; sourceTree = ""; }; 59 | 8F6CC29B23802CA9005184E4 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Main.strings"; sourceTree = ""; }; 60 | 8F6CC29C23802CA9005184E4 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/LaunchScreen.strings"; sourceTree = ""; }; 61 | 8F6CC29D23802CAF005184E4 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Main.strings; sourceTree = ""; }; 62 | 8F6CC29E23802CAF005184E4 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/LaunchScreen.strings; sourceTree = ""; }; 63 | 8FF95047239D608E00856085 /* MuchaFrenchCapitals.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = MuchaFrenchCapitals.ttf; sourceTree = ""; }; 64 | 8FF95049239D608E00856085 /* Chibrush.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = Chibrush.ttf; sourceTree = ""; }; 65 | 8FF9504B239D608E00856085 /* LemonadeStand.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = LemonadeStand.ttf; sourceTree = ""; }; 66 | 8FF95050239D64F800856085 /* Roboto-Medium.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Roboto-Medium.ttf"; sourceTree = ""; }; 67 | 8FF95052239D64F800856085 /* Roboto-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Roboto-Regular.ttf"; sourceTree = ""; }; 68 | 8FF95059239D64F800856085 /* Roboto-Bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Roboto-Bold.ttf"; sourceTree = ""; }; 69 | 8FF9505D239D64F800856085 /* NotoSerifJP-Bold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "NotoSerifJP-Bold.otf"; sourceTree = ""; }; 70 | 8FF9505E239D64F800856085 /* NotoSerifJP-Medium.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "NotoSerifJP-Medium.otf"; sourceTree = ""; }; 71 | 8FF95061239D64F800856085 /* NotoSerifJP-Regular.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "NotoSerifJP-Regular.otf"; sourceTree = ""; }; 72 | 8FF95065239D64F800856085 /* Jomhuria.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = Jomhuria.ttf; sourceTree = ""; }; 73 | A9794807A18BED66537EBB00 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; 74 | B953EC674BFE9ECC523CA95D /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 75 | F233C2738A93DBCFAF81D85F /* Pods-AALocalizationKit_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AALocalizationKit_Tests.debug.xcconfig"; path = "Target Support Files/Pods-AALocalizationKit_Tests/Pods-AALocalizationKit_Tests.debug.xcconfig"; sourceTree = ""; }; 76 | /* End PBXFileReference section */ 77 | 78 | /* Begin PBXFrameworksBuildPhase section */ 79 | 607FACCD1AFB9204008FA782 /* Frameworks */ = { 80 | isa = PBXFrameworksBuildPhase; 81 | buildActionMask = 2147483647; 82 | files = ( 83 | 702E0C7EB1E05D68D25C7F8C /* Pods_AALocalizationKit_Example.framework in Frameworks */, 84 | ); 85 | runOnlyForDeploymentPostprocessing = 0; 86 | }; 87 | /* End PBXFrameworksBuildPhase section */ 88 | 89 | /* Begin PBXGroup section */ 90 | 301F9B4F4825E14015D8C2B5 /* Pods */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | 1179C07E694F503103CAE559 /* Pods-AALocalizationKit_Example.debug.xcconfig */, 94 | 323A797AC12F8B0ACDE279D0 /* Pods-AALocalizationKit_Example.release.xcconfig */, 95 | F233C2738A93DBCFAF81D85F /* Pods-AALocalizationKit_Tests.debug.xcconfig */, 96 | 0DBDD3241A514C3E03130AA3 /* Pods-AALocalizationKit_Tests.release.xcconfig */, 97 | ); 98 | path = Pods; 99 | sourceTree = ""; 100 | }; 101 | 607FACC71AFB9204008FA782 = { 102 | isa = PBXGroup; 103 | children = ( 104 | 607FACF51AFB993E008FA782 /* Podspec Metadata */, 105 | 607FACD21AFB9204008FA782 /* Example for AALocalizationKit */, 106 | 607FACE81AFB9204008FA782 /* Tests */, 107 | 607FACD11AFB9204008FA782 /* Products */, 108 | 301F9B4F4825E14015D8C2B5 /* Pods */, 109 | 98199E8DA3A4FDDBB061C132 /* Frameworks */, 110 | ); 111 | sourceTree = ""; 112 | }; 113 | 607FACD11AFB9204008FA782 /* Products */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | 607FACD01AFB9204008FA782 /* AALocalizationKit_Example.app */, 117 | ); 118 | name = Products; 119 | sourceTree = ""; 120 | }; 121 | 607FACD21AFB9204008FA782 /* Example for AALocalizationKit */ = { 122 | isa = PBXGroup; 123 | children = ( 124 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */, 125 | 607FACD71AFB9204008FA782 /* ViewController.swift */, 126 | 8F6CC283237FEEC7005184E4 /* Extensions.swift */, 127 | 413C62522607D5E0006F2113 /* Localizable.strings */, 128 | 607FACD91AFB9204008FA782 /* Main.storyboard */, 129 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */, 130 | 607FACDC1AFB9204008FA782 /* Images.xcassets */, 131 | 8FB0E2CB235F465000BBE0B3 /* Resources */, 132 | 607FACD31AFB9204008FA782 /* Supporting Files */, 133 | ); 134 | name = "Example for AALocalizationKit"; 135 | path = AALocalizationKit; 136 | sourceTree = ""; 137 | }; 138 | 607FACD31AFB9204008FA782 /* Supporting Files */ = { 139 | isa = PBXGroup; 140 | children = ( 141 | 607FACD41AFB9204008FA782 /* Info.plist */, 142 | ); 143 | name = "Supporting Files"; 144 | sourceTree = ""; 145 | }; 146 | 607FACE81AFB9204008FA782 /* Tests */ = { 147 | isa = PBXGroup; 148 | children = ( 149 | 607FACEB1AFB9204008FA782 /* Tests.swift */, 150 | 607FACE91AFB9204008FA782 /* Supporting Files */, 151 | ); 152 | path = Tests; 153 | sourceTree = ""; 154 | }; 155 | 607FACE91AFB9204008FA782 /* Supporting Files */ = { 156 | isa = PBXGroup; 157 | children = ( 158 | 607FACEA1AFB9204008FA782 /* Info.plist */, 159 | ); 160 | name = "Supporting Files"; 161 | sourceTree = ""; 162 | }; 163 | 607FACF51AFB993E008FA782 /* Podspec Metadata */ = { 164 | isa = PBXGroup; 165 | children = ( 166 | 8E146012D3AD58C9401A1F64 /* AALocalizationKit.podspec */, 167 | B953EC674BFE9ECC523CA95D /* README.md */, 168 | A9794807A18BED66537EBB00 /* LICENSE */, 169 | ); 170 | name = "Podspec Metadata"; 171 | sourceTree = ""; 172 | }; 173 | 8FB0E2CB235F465000BBE0B3 /* Resources */ = { 174 | isa = PBXGroup; 175 | children = ( 176 | 8FB0E2CC235F465000BBE0B3 /* Fonts */, 177 | ); 178 | path = Resources; 179 | sourceTree = ""; 180 | }; 181 | 8FB0E2CC235F465000BBE0B3 /* Fonts */ = { 182 | isa = PBXGroup; 183 | children = ( 184 | 8FF95064239D64F800856085 /* Jomhuria (Arabic) */, 185 | 8FF9505C239D64F800856085 /* Noto Serif (Japanese) */, 186 | 8FF9504F239D64F800856085 /* Roboto (English) */, 187 | 8FF95048239D608E00856085 /* Chibrush (Chinese) */, 188 | 8FF9504A239D608E00856085 /* LemonadeStand (German) */, 189 | 8FF95046239D608E00856085 /* MuchaFrenchCapitals (French) */, 190 | ); 191 | path = Fonts; 192 | sourceTree = ""; 193 | }; 194 | 8FF95046239D608E00856085 /* MuchaFrenchCapitals (French) */ = { 195 | isa = PBXGroup; 196 | children = ( 197 | 8FF95047239D608E00856085 /* MuchaFrenchCapitals.ttf */, 198 | ); 199 | path = "MuchaFrenchCapitals (French)"; 200 | sourceTree = ""; 201 | }; 202 | 8FF95048239D608E00856085 /* Chibrush (Chinese) */ = { 203 | isa = PBXGroup; 204 | children = ( 205 | 8FF95049239D608E00856085 /* Chibrush.ttf */, 206 | ); 207 | path = "Chibrush (Chinese)"; 208 | sourceTree = ""; 209 | }; 210 | 8FF9504A239D608E00856085 /* LemonadeStand (German) */ = { 211 | isa = PBXGroup; 212 | children = ( 213 | 8FF9504B239D608E00856085 /* LemonadeStand.ttf */, 214 | ); 215 | path = "LemonadeStand (German)"; 216 | sourceTree = ""; 217 | }; 218 | 8FF9504F239D64F800856085 /* Roboto (English) */ = { 219 | isa = PBXGroup; 220 | children = ( 221 | 8FF95050239D64F800856085 /* Roboto-Medium.ttf */, 222 | 8FF95052239D64F800856085 /* Roboto-Regular.ttf */, 223 | 8FF95059239D64F800856085 /* Roboto-Bold.ttf */, 224 | ); 225 | path = "Roboto (English)"; 226 | sourceTree = ""; 227 | }; 228 | 8FF9505C239D64F800856085 /* Noto Serif (Japanese) */ = { 229 | isa = PBXGroup; 230 | children = ( 231 | 8FF9505D239D64F800856085 /* NotoSerifJP-Bold.otf */, 232 | 8FF9505E239D64F800856085 /* NotoSerifJP-Medium.otf */, 233 | 8FF95061239D64F800856085 /* NotoSerifJP-Regular.otf */, 234 | ); 235 | path = "Noto Serif (Japanese)"; 236 | sourceTree = ""; 237 | }; 238 | 8FF95064239D64F800856085 /* Jomhuria (Arabic) */ = { 239 | isa = PBXGroup; 240 | children = ( 241 | 8FF95065239D64F800856085 /* Jomhuria.ttf */, 242 | ); 243 | path = "Jomhuria (Arabic)"; 244 | sourceTree = ""; 245 | }; 246 | 98199E8DA3A4FDDBB061C132 /* Frameworks */ = { 247 | isa = PBXGroup; 248 | children = ( 249 | 79163811543E7FE6B6B28D94 /* Pods_AALocalizationKit_Example.framework */, 250 | 3DBF15E3C87A818B1C0D9C06 /* Pods_AALocalizationKit_Tests.framework */, 251 | ); 252 | name = Frameworks; 253 | sourceTree = ""; 254 | }; 255 | /* End PBXGroup section */ 256 | 257 | /* Begin PBXNativeTarget section */ 258 | 607FACCF1AFB9204008FA782 /* AALocalizationKit_Example */ = { 259 | isa = PBXNativeTarget; 260 | buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "AALocalizationKit_Example" */; 261 | buildPhases = ( 262 | A3E0437746032E180B832930 /* [CP] Check Pods Manifest.lock */, 263 | 607FACCC1AFB9204008FA782 /* Sources */, 264 | 607FACCD1AFB9204008FA782 /* Frameworks */, 265 | 607FACCE1AFB9204008FA782 /* Resources */, 266 | 0898DF6C4F0E3A35D842BF3C /* [CP] Embed Pods Frameworks */, 267 | ); 268 | buildRules = ( 269 | ); 270 | dependencies = ( 271 | ); 272 | name = AALocalizationKit_Example; 273 | productName = AALocalizationKit; 274 | productReference = 607FACD01AFB9204008FA782 /* AALocalizationKit_Example.app */; 275 | productType = "com.apple.product-type.application"; 276 | }; 277 | /* End PBXNativeTarget section */ 278 | 279 | /* Begin PBXProject section */ 280 | 607FACC81AFB9204008FA782 /* Project object */ = { 281 | isa = PBXProject; 282 | attributes = { 283 | LastSwiftUpdateCheck = 0830; 284 | LastUpgradeCheck = 0830; 285 | ORGANIZATIONNAME = CocoaPods; 286 | TargetAttributes = { 287 | 607FACCF1AFB9204008FA782 = { 288 | CreatedOnToolsVersion = 6.3.1; 289 | DevelopmentTeam = N5VK3LC7X7; 290 | LastSwiftMigration = 0900; 291 | }; 292 | }; 293 | }; 294 | buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "AALocalizationKit" */; 295 | compatibilityVersion = "Xcode 3.2"; 296 | developmentRegion = English; 297 | hasScannedForEncodings = 0; 298 | knownRegions = ( 299 | English, 300 | Base, 301 | ja, 302 | ar, 303 | fr, 304 | "zh-Hans", 305 | de, 306 | ); 307 | mainGroup = 607FACC71AFB9204008FA782; 308 | productRefGroup = 607FACD11AFB9204008FA782 /* Products */; 309 | projectDirPath = ""; 310 | projectRoot = ""; 311 | targets = ( 312 | 607FACCF1AFB9204008FA782 /* AALocalizationKit_Example */, 313 | ); 314 | }; 315 | /* End PBXProject section */ 316 | 317 | /* Begin PBXResourcesBuildPhase section */ 318 | 607FACCE1AFB9204008FA782 /* Resources */ = { 319 | isa = PBXResourcesBuildPhase; 320 | buildActionMask = 2147483647; 321 | files = ( 322 | 8FF9504E239D608E00856085 /* LemonadeStand.ttf in Resources */, 323 | 8FF95079239D64F900856085 /* Jomhuria.ttf in Resources */, 324 | 8FF9504C239D608E00856085 /* MuchaFrenchCapitals.ttf in Resources */, 325 | 413C62502607D5E0006F2113 /* Localizable.strings in Resources */, 326 | 8FF95076239D64F900856085 /* NotoSerifJP-Regular.otf in Resources */, 327 | 8FF9504D239D608E00856085 /* Chibrush.ttf in Resources */, 328 | 8FF95073239D64F900856085 /* NotoSerifJP-Medium.otf in Resources */, 329 | 8FF95066239D64F900856085 /* Roboto-Medium.ttf in Resources */, 330 | 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */, 331 | 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */, 332 | 8FF95068239D64F900856085 /* Roboto-Regular.ttf in Resources */, 333 | 8FF9506F239D64F900856085 /* Roboto-Bold.ttf in Resources */, 334 | 8FF95072239D64F900856085 /* NotoSerifJP-Bold.otf in Resources */, 335 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */, 336 | ); 337 | runOnlyForDeploymentPostprocessing = 0; 338 | }; 339 | /* End PBXResourcesBuildPhase section */ 340 | 341 | /* Begin PBXShellScriptBuildPhase section */ 342 | 0898DF6C4F0E3A35D842BF3C /* [CP] Embed Pods Frameworks */ = { 343 | isa = PBXShellScriptBuildPhase; 344 | buildActionMask = 2147483647; 345 | files = ( 346 | ); 347 | inputPaths = ( 348 | "${PODS_ROOT}/Target Support Files/Pods-AALocalizationKit_Example/Pods-AALocalizationKit_Example-frameworks.sh", 349 | "${BUILT_PRODUCTS_DIR}/AALocalizationKit/AALocalizationKit.framework", 350 | "${BUILT_PRODUCTS_DIR}/AAPickerView/AAPickerView.framework", 351 | ); 352 | name = "[CP] Embed Pods Frameworks"; 353 | outputPaths = ( 354 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AALocalizationKit.framework", 355 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AAPickerView.framework", 356 | ); 357 | runOnlyForDeploymentPostprocessing = 0; 358 | shellPath = /bin/sh; 359 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-AALocalizationKit_Example/Pods-AALocalizationKit_Example-frameworks.sh\"\n"; 360 | showEnvVarsInLog = 0; 361 | }; 362 | A3E0437746032E180B832930 /* [CP] Check Pods Manifest.lock */ = { 363 | isa = PBXShellScriptBuildPhase; 364 | buildActionMask = 2147483647; 365 | files = ( 366 | ); 367 | inputFileListPaths = ( 368 | ); 369 | inputPaths = ( 370 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 371 | "${PODS_ROOT}/Manifest.lock", 372 | ); 373 | name = "[CP] Check Pods Manifest.lock"; 374 | outputFileListPaths = ( 375 | ); 376 | outputPaths = ( 377 | "$(DERIVED_FILE_DIR)/Pods-AALocalizationKit_Example-checkManifestLockResult.txt", 378 | ); 379 | runOnlyForDeploymentPostprocessing = 0; 380 | shellPath = /bin/sh; 381 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 382 | showEnvVarsInLog = 0; 383 | }; 384 | /* End PBXShellScriptBuildPhase section */ 385 | 386 | /* Begin PBXSourcesBuildPhase section */ 387 | 607FACCC1AFB9204008FA782 /* Sources */ = { 388 | isa = PBXSourcesBuildPhase; 389 | buildActionMask = 2147483647; 390 | files = ( 391 | 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */, 392 | 8F6CC284237FEEC7005184E4 /* Extensions.swift in Sources */, 393 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */, 394 | ); 395 | runOnlyForDeploymentPostprocessing = 0; 396 | }; 397 | /* End PBXSourcesBuildPhase section */ 398 | 399 | /* Begin PBXVariantGroup section */ 400 | 413C62522607D5E0006F2113 /* Localizable.strings */ = { 401 | isa = PBXVariantGroup; 402 | children = ( 403 | 413C62512607D5E0006F2113 /* English */, 404 | 413C62542607D5E9006F2113 /* ar */, 405 | 413C62552607D5EA006F2113 /* zh-Hans */, 406 | 413C62562607D5EB006F2113 /* fr */, 407 | 413C62572607D5ED006F2113 /* de */, 408 | 413C62582607D5EE006F2113 /* ja */, 409 | ); 410 | name = Localizable.strings; 411 | sourceTree = ""; 412 | }; 413 | 607FACD91AFB9204008FA782 /* Main.storyboard */ = { 414 | isa = PBXVariantGroup; 415 | children = ( 416 | 607FACDA1AFB9204008FA782 /* Base */, 417 | 8F6CC295238029F6005184E4 /* ja */, 418 | 8F6CC29723802A07005184E4 /* ar */, 419 | 8F6CC29923802CA1005184E4 /* fr */, 420 | 8F6CC29B23802CA9005184E4 /* zh-Hans */, 421 | 8F6CC29D23802CAF005184E4 /* de */, 422 | ); 423 | name = Main.storyboard; 424 | sourceTree = ""; 425 | }; 426 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */ = { 427 | isa = PBXVariantGroup; 428 | children = ( 429 | 607FACDF1AFB9204008FA782 /* Base */, 430 | 8F6CC296238029F6005184E4 /* ja */, 431 | 8F6CC29823802A07005184E4 /* ar */, 432 | 8F6CC29A23802CA1005184E4 /* fr */, 433 | 8F6CC29C23802CA9005184E4 /* zh-Hans */, 434 | 8F6CC29E23802CAF005184E4 /* de */, 435 | ); 436 | name = LaunchScreen.xib; 437 | sourceTree = ""; 438 | }; 439 | /* End PBXVariantGroup section */ 440 | 441 | /* Begin XCBuildConfiguration section */ 442 | 607FACED1AFB9204008FA782 /* Debug */ = { 443 | isa = XCBuildConfiguration; 444 | buildSettings = { 445 | ALWAYS_SEARCH_USER_PATHS = NO; 446 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 447 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 448 | CLANG_CXX_LIBRARY = "libc++"; 449 | CLANG_ENABLE_MODULES = YES; 450 | CLANG_ENABLE_OBJC_ARC = YES; 451 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 452 | CLANG_WARN_BOOL_CONVERSION = YES; 453 | CLANG_WARN_COMMA = YES; 454 | CLANG_WARN_CONSTANT_CONVERSION = YES; 455 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 456 | CLANG_WARN_EMPTY_BODY = YES; 457 | CLANG_WARN_ENUM_CONVERSION = YES; 458 | CLANG_WARN_INFINITE_RECURSION = YES; 459 | CLANG_WARN_INT_CONVERSION = YES; 460 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 461 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 462 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 463 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 464 | CLANG_WARN_STRICT_PROTOTYPES = YES; 465 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 466 | CLANG_WARN_UNREACHABLE_CODE = YES; 467 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 468 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 469 | COPY_PHASE_STRIP = NO; 470 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 471 | ENABLE_STRICT_OBJC_MSGSEND = YES; 472 | ENABLE_TESTABILITY = YES; 473 | GCC_C_LANGUAGE_STANDARD = gnu99; 474 | GCC_DYNAMIC_NO_PIC = NO; 475 | GCC_NO_COMMON_BLOCKS = YES; 476 | GCC_OPTIMIZATION_LEVEL = 0; 477 | GCC_PREPROCESSOR_DEFINITIONS = ( 478 | "DEBUG=1", 479 | "$(inherited)", 480 | ); 481 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 482 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 483 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 484 | GCC_WARN_UNDECLARED_SELECTOR = YES; 485 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 486 | GCC_WARN_UNUSED_FUNCTION = YES; 487 | GCC_WARN_UNUSED_VARIABLE = YES; 488 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 489 | MTL_ENABLE_DEBUG_INFO = YES; 490 | ONLY_ACTIVE_ARCH = YES; 491 | SDKROOT = iphoneos; 492 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 493 | }; 494 | name = Debug; 495 | }; 496 | 607FACEE1AFB9204008FA782 /* Release */ = { 497 | isa = XCBuildConfiguration; 498 | buildSettings = { 499 | ALWAYS_SEARCH_USER_PATHS = NO; 500 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 501 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 502 | CLANG_CXX_LIBRARY = "libc++"; 503 | CLANG_ENABLE_MODULES = YES; 504 | CLANG_ENABLE_OBJC_ARC = YES; 505 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 506 | CLANG_WARN_BOOL_CONVERSION = YES; 507 | CLANG_WARN_COMMA = YES; 508 | CLANG_WARN_CONSTANT_CONVERSION = YES; 509 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 510 | CLANG_WARN_EMPTY_BODY = YES; 511 | CLANG_WARN_ENUM_CONVERSION = YES; 512 | CLANG_WARN_INFINITE_RECURSION = YES; 513 | CLANG_WARN_INT_CONVERSION = YES; 514 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 515 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 516 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 517 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 518 | CLANG_WARN_STRICT_PROTOTYPES = YES; 519 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 520 | CLANG_WARN_UNREACHABLE_CODE = YES; 521 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 522 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 523 | COPY_PHASE_STRIP = NO; 524 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 525 | ENABLE_NS_ASSERTIONS = NO; 526 | ENABLE_STRICT_OBJC_MSGSEND = YES; 527 | GCC_C_LANGUAGE_STANDARD = gnu99; 528 | GCC_NO_COMMON_BLOCKS = YES; 529 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 530 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 531 | GCC_WARN_UNDECLARED_SELECTOR = YES; 532 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 533 | GCC_WARN_UNUSED_FUNCTION = YES; 534 | GCC_WARN_UNUSED_VARIABLE = YES; 535 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 536 | MTL_ENABLE_DEBUG_INFO = NO; 537 | SDKROOT = iphoneos; 538 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 539 | VALIDATE_PRODUCT = YES; 540 | }; 541 | name = Release; 542 | }; 543 | 607FACF01AFB9204008FA782 /* Debug */ = { 544 | isa = XCBuildConfiguration; 545 | baseConfigurationReference = 1179C07E694F503103CAE559 /* Pods-AALocalizationKit_Example.debug.xcconfig */; 546 | buildSettings = { 547 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 548 | DEVELOPMENT_TEAM = N5VK3LC7X7; 549 | INFOPLIST_FILE = AALocalizationKit/Info.plist; 550 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 551 | MODULE_NAME = ExampleApp; 552 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 553 | PRODUCT_NAME = "$(TARGET_NAME)"; 554 | SWIFT_SWIFT3_OBJC_INFERENCE = Default; 555 | SWIFT_VERSION = 4.0; 556 | }; 557 | name = Debug; 558 | }; 559 | 607FACF11AFB9204008FA782 /* Release */ = { 560 | isa = XCBuildConfiguration; 561 | baseConfigurationReference = 323A797AC12F8B0ACDE279D0 /* Pods-AALocalizationKit_Example.release.xcconfig */; 562 | buildSettings = { 563 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 564 | DEVELOPMENT_TEAM = N5VK3LC7X7; 565 | INFOPLIST_FILE = AALocalizationKit/Info.plist; 566 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 567 | MODULE_NAME = ExampleApp; 568 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 569 | PRODUCT_NAME = "$(TARGET_NAME)"; 570 | SWIFT_SWIFT3_OBJC_INFERENCE = Default; 571 | SWIFT_VERSION = 4.0; 572 | }; 573 | name = Release; 574 | }; 575 | /* End XCBuildConfiguration section */ 576 | 577 | /* Begin XCConfigurationList section */ 578 | 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "AALocalizationKit" */ = { 579 | isa = XCConfigurationList; 580 | buildConfigurations = ( 581 | 607FACED1AFB9204008FA782 /* Debug */, 582 | 607FACEE1AFB9204008FA782 /* Release */, 583 | ); 584 | defaultConfigurationIsVisible = 0; 585 | defaultConfigurationName = Release; 586 | }; 587 | 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "AALocalizationKit_Example" */ = { 588 | isa = XCConfigurationList; 589 | buildConfigurations = ( 590 | 607FACF01AFB9204008FA782 /* Debug */, 591 | 607FACF11AFB9204008FA782 /* Release */, 592 | ); 593 | defaultConfigurationIsVisible = 0; 594 | defaultConfigurationName = Release; 595 | }; 596 | /* End XCConfigurationList section */ 597 | }; 598 | rootObject = 607FACC81AFB9204008FA782 /* Project object */; 599 | } 600 | -------------------------------------------------------------------------------- /Example/AALocalizationKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/AALocalizationKit.xcodeproj/xcshareddata/xcschemes/AALocalizationKit-Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 45 | 46 | 48 | 54 | 55 | 56 | 57 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 80 | 82 | 88 | 89 | 90 | 91 | 92 | 93 | 99 | 101 | 107 | 108 | 109 | 110 | 112 | 113 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /Example/AALocalizationKit.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/AALocalizationKit.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/AALocalizationKit/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // AALocalizationKit 4 | // 5 | // Created by EngrAhsanAli on 06/19/2019. 6 | // Copyright (c) 2019 EngrAhsanAli. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import AALocalizationKit 11 | 12 | @UIApplicationMain 13 | class AppDelegate: UIResponder, UIApplicationDelegate { 14 | 15 | var window: UIWindow? 16 | 17 | // config to set one file only without weight 18 | // better confirguration setting 19 | 20 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 21 | // Override point for customization after application launch. 22 | 23 | configureAALK() 24 | return true 25 | } 26 | 27 | func applicationWillResignActive(_ application: UIApplication) { 28 | // 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. 29 | // 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. 30 | } 31 | 32 | func applicationDidEnterBackground(_ application: UIApplication) { 33 | // 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. 34 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 35 | } 36 | 37 | func applicationWillEnterForeground(_ application: UIApplication) { 38 | // 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. 39 | } 40 | 41 | func applicationDidBecomeActive(_ application: UIApplication) { 42 | // 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. 43 | } 44 | 45 | func applicationWillTerminate(_ application: UIApplication) { 46 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 47 | } 48 | 49 | 50 | } 51 | 52 | -------------------------------------------------------------------------------- /Example/AALocalizationKit/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 25 | 26 | 27 | 28 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /Example/AALocalizationKit/Base.lproj/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 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 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 | 114 | 115 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /Example/AALocalizationKit/English.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | AALocalizationKit 4 | 5 | Created by Muhammad Ahsan Ali on 2021/03/22. 6 | Copyright © 2021 CocoaPods. All rights reserved. 7 | */ 8 | 9 | "Hello" = "Hello"; 10 | 11 | "Hi" = "Hi"; 12 | 13 | "Write you name here" = "Write you name here"; 14 | 15 | "What's your name?" = "What's your name?"; 16 | 17 | "Greetings to you" = "Greetings to you"; 18 | 19 | "Select Language" = "Select Language"; 20 | -------------------------------------------------------------------------------- /Example/AALocalizationKit/Extensions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Extensions.swift 3 | // AALocalizationKit_Example 4 | // 5 | // Created by M. Ahsan Ali on 16/11/2019. 6 | // Copyright © 2019 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import AAPickerView 11 | import AALocalizationKit 12 | 13 | // MARK: - Global 14 | let appDelegate = UIApplication.shared.delegate as! AppDelegate 15 | 16 | 17 | // MARK: - UITextField 18 | extension UITextField { 19 | 20 | func setIcon() { 21 | 22 | let padding = 8 23 | let size = 18 24 | 25 | let outerView = UIView(frame: CGRect(x: 0, y: 0, width: size+padding, height: size) ) 26 | let iconView = UIImageView(frame: CGRect(x: padding, y: 0, width: size, height: size)) 27 | iconView.image = #imageLiteral(resourceName: "down_arrow") 28 | outerView.addSubview(iconView) 29 | 30 | rightView = outerView 31 | rightViewMode = .always 32 | } 33 | 34 | } 35 | 36 | // MARK: - AAPickerView 37 | class PickerView: AAPickerView { 38 | 39 | 40 | override func caretRect(for position: UITextPosition) -> CGRect { 41 | return .zero 42 | } 43 | 44 | override func selectionRects(for range: UITextRange) -> [Any] { 45 | return [] 46 | } 47 | 48 | override func canPerformAction(_ action: Selector, withSender sender: Any?) -> Bool { 49 | return false 50 | } 51 | 52 | } 53 | 54 | // MARK: - UIViewController 55 | 56 | extension UIViewController { 57 | func reloadViewFromNib() { 58 | let parent = view.superview 59 | view.removeFromSuperview() 60 | view = nil 61 | parent?.addSubview(view) 62 | 63 | } 64 | } 65 | 66 | 67 | // MARK: - AALocalizationKit 68 | 69 | func configureAALK() { 70 | let languageFont: [AALanguage : [UIFont.Weight : String]] = [ 71 | .ar : [.regular: "Jomhuria"], 72 | 73 | .zhHans : [.regular: "Chibrush"], 74 | 75 | .fr : [.regular: "MuchaFrenchCapitals"], 76 | 77 | .de : [.regular: "LemonadeStand"], 78 | 79 | .en : [.regular: "Roboto-Regular", 80 | .medium: "Roboto-Medium", 81 | .bold: "Roboto-Bold"], 82 | 83 | .ja : [.regular: "NotoSerifJP-Regular", 84 | .medium: "NotoSerifJP-Medium", 85 | .bold: "NotoSerifJP-Bold"] 86 | ] 87 | 88 | AALK.configuration.languageFont = languageFont 89 | AALK.configuration.defaultFont = "Roboto" 90 | AALK.configuration.exceptions = ["SomeFont"] 91 | 92 | let options = AALK_Configuration.UpdateOptions() 93 | options.container = [ViewController.self] 94 | AALK.configuration.appearanceElements = [.label(options), 95 | .button(options), 96 | .textField(options), 97 | .textView(options)] 98 | AALK.setApperance() 99 | } 100 | -------------------------------------------------------------------------------- /Example/AALocalizationKit/Images.xcassets/AA.imageset/17049477.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngrAhsanAli/AALocalizationKit/1133981a974e3e836c1891fcc7753df102a18129/Example/AALocalizationKit/Images.xcassets/AA.imageset/17049477.png -------------------------------------------------------------------------------- /Example/AALocalizationKit/Images.xcassets/AA.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "17049477.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "57x57", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-57x57@1x.png", 49 | "scale" : "1x" 50 | }, 51 | { 52 | "size" : "57x57", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-57x57@2x.png", 55 | "scale" : "2x" 56 | }, 57 | { 58 | "size" : "60x60", 59 | "idiom" : "iphone", 60 | "filename" : "Icon-App-60x60@2x.png", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "size" : "60x60", 65 | "idiom" : "iphone", 66 | "filename" : "Icon-App-60x60@3x.png", 67 | "scale" : "3x" 68 | }, 69 | { 70 | "size" : "20x20", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-20x20@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "20x20", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-20x20@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "29x29", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-29x29@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "29x29", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-29x29@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "40x40", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-40x40@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "40x40", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-40x40@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "50x50", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-Small-50x50@1x.png", 109 | "scale" : "1x" 110 | }, 111 | { 112 | "size" : "50x50", 113 | "idiom" : "ipad", 114 | "filename" : "Icon-Small-50x50@2x.png", 115 | "scale" : "2x" 116 | }, 117 | { 118 | "size" : "72x72", 119 | "idiom" : "ipad", 120 | "filename" : "Icon-App-72x72@1x.png", 121 | "scale" : "1x" 122 | }, 123 | { 124 | "size" : "72x72", 125 | "idiom" : "ipad", 126 | "filename" : "Icon-App-72x72@2x.png", 127 | "scale" : "2x" 128 | }, 129 | { 130 | "size" : "76x76", 131 | "idiom" : "ipad", 132 | "filename" : "Icon-App-76x76@1x.png", 133 | "scale" : "1x" 134 | }, 135 | { 136 | "size" : "76x76", 137 | "idiom" : "ipad", 138 | "filename" : "Icon-App-76x76@2x.png", 139 | "scale" : "2x" 140 | }, 141 | { 142 | "size" : "83.5x83.5", 143 | "idiom" : "ipad", 144 | "filename" : "Icon-App-83.5x83.5@2x.png", 145 | "scale" : "2x" 146 | }, 147 | { 148 | "idiom" : "ios-marketing", 149 | "size" : "1024x1024", 150 | "scale" : "1x" 151 | } 152 | ], 153 | "info" : { 154 | "version" : 1, 155 | "author" : "xcode" 156 | } 157 | } -------------------------------------------------------------------------------- /Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngrAhsanAli/AALocalizationKit/1133981a974e3e836c1891fcc7753df102a18129/Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngrAhsanAli/AALocalizationKit/1133981a974e3e836c1891fcc7753df102a18129/Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngrAhsanAli/AALocalizationKit/1133981a974e3e836c1891fcc7753df102a18129/Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngrAhsanAli/AALocalizationKit/1133981a974e3e836c1891fcc7753df102a18129/Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngrAhsanAli/AALocalizationKit/1133981a974e3e836c1891fcc7753df102a18129/Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngrAhsanAli/AALocalizationKit/1133981a974e3e836c1891fcc7753df102a18129/Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngrAhsanAli/AALocalizationKit/1133981a974e3e836c1891fcc7753df102a18129/Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngrAhsanAli/AALocalizationKit/1133981a974e3e836c1891fcc7753df102a18129/Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngrAhsanAli/AALocalizationKit/1133981a974e3e836c1891fcc7753df102a18129/Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngrAhsanAli/AALocalizationKit/1133981a974e3e836c1891fcc7753df102a18129/Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png -------------------------------------------------------------------------------- /Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngrAhsanAli/AALocalizationKit/1133981a974e3e836c1891fcc7753df102a18129/Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png -------------------------------------------------------------------------------- /Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngrAhsanAli/AALocalizationKit/1133981a974e3e836c1891fcc7753df102a18129/Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngrAhsanAli/AALocalizationKit/1133981a974e3e836c1891fcc7753df102a18129/Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngrAhsanAli/AALocalizationKit/1133981a974e3e836c1891fcc7753df102a18129/Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png -------------------------------------------------------------------------------- /Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngrAhsanAli/AALocalizationKit/1133981a974e3e836c1891fcc7753df102a18129/Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png -------------------------------------------------------------------------------- /Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngrAhsanAli/AALocalizationKit/1133981a974e3e836c1891fcc7753df102a18129/Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngrAhsanAli/AALocalizationKit/1133981a974e3e836c1891fcc7753df102a18129/Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngrAhsanAli/AALocalizationKit/1133981a974e3e836c1891fcc7753df102a18129/Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-Small-50x50@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngrAhsanAli/AALocalizationKit/1133981a974e3e836c1891fcc7753df102a18129/Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-Small-50x50@1x.png -------------------------------------------------------------------------------- /Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-Small-50x50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngrAhsanAli/AALocalizationKit/1133981a974e3e836c1891fcc7753df102a18129/Example/AALocalizationKit/Images.xcassets/AppIcon.appiconset/Icon-Small-50x50@2x.png -------------------------------------------------------------------------------- /Example/AALocalizationKit/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/AALocalizationKit/Images.xcassets/down_arrow.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "down-arrow.png", 6 | "scale" : "1x" 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 | } -------------------------------------------------------------------------------- /Example/AALocalizationKit/Images.xcassets/down_arrow.imageset/down-arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngrAhsanAli/AALocalizationKit/1133981a974e3e836c1891fcc7753df102a18129/Example/AALocalizationKit/Images.xcassets/down_arrow.imageset/down-arrow.png -------------------------------------------------------------------------------- /Example/AALocalizationKit/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 | UIAppFonts 28 | 29 | Chibrush.ttf 30 | LemonadeStand.ttf 31 | MuchaFrenchCapitals.ttf 32 | Jomhuria.ttf 33 | NotoSerifJP-Bold.otf 34 | NotoSerifJP-Medium.otf 35 | NotoSerifJP-Regular.otf 36 | Roboto-Regular.ttf 37 | Roboto-Medium.ttf 38 | Roboto-Bold.ttf 39 | 40 | UIMainStoryboardFile 41 | Main 42 | UIRequiredDeviceCapabilities 43 | 44 | armv7 45 | 46 | UISupportedInterfaceOrientations 47 | 48 | UIInterfaceOrientationPortrait 49 | UIInterfaceOrientationLandscapeLeft 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /Example/AALocalizationKit/Resources/Fonts/Chibrush (Chinese)/Chibrush.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngrAhsanAli/AALocalizationKit/1133981a974e3e836c1891fcc7753df102a18129/Example/AALocalizationKit/Resources/Fonts/Chibrush (Chinese)/Chibrush.ttf -------------------------------------------------------------------------------- /Example/AALocalizationKit/Resources/Fonts/Jomhuria (Arabic)/Jomhuria.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngrAhsanAli/AALocalizationKit/1133981a974e3e836c1891fcc7753df102a18129/Example/AALocalizationKit/Resources/Fonts/Jomhuria (Arabic)/Jomhuria.ttf -------------------------------------------------------------------------------- /Example/AALocalizationKit/Resources/Fonts/LemonadeStand (German)/LemonadeStand.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngrAhsanAli/AALocalizationKit/1133981a974e3e836c1891fcc7753df102a18129/Example/AALocalizationKit/Resources/Fonts/LemonadeStand (German)/LemonadeStand.ttf -------------------------------------------------------------------------------- /Example/AALocalizationKit/Resources/Fonts/MuchaFrenchCapitals (French)/MuchaFrenchCapitals.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngrAhsanAli/AALocalizationKit/1133981a974e3e836c1891fcc7753df102a18129/Example/AALocalizationKit/Resources/Fonts/MuchaFrenchCapitals (French)/MuchaFrenchCapitals.ttf -------------------------------------------------------------------------------- /Example/AALocalizationKit/Resources/Fonts/Noto Serif (Japanese)/NotoSerifJP-Bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngrAhsanAli/AALocalizationKit/1133981a974e3e836c1891fcc7753df102a18129/Example/AALocalizationKit/Resources/Fonts/Noto Serif (Japanese)/NotoSerifJP-Bold.otf -------------------------------------------------------------------------------- /Example/AALocalizationKit/Resources/Fonts/Noto Serif (Japanese)/NotoSerifJP-Medium.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngrAhsanAli/AALocalizationKit/1133981a974e3e836c1891fcc7753df102a18129/Example/AALocalizationKit/Resources/Fonts/Noto Serif (Japanese)/NotoSerifJP-Medium.otf -------------------------------------------------------------------------------- /Example/AALocalizationKit/Resources/Fonts/Noto Serif (Japanese)/NotoSerifJP-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngrAhsanAli/AALocalizationKit/1133981a974e3e836c1891fcc7753df102a18129/Example/AALocalizationKit/Resources/Fonts/Noto Serif (Japanese)/NotoSerifJP-Regular.otf -------------------------------------------------------------------------------- /Example/AALocalizationKit/Resources/Fonts/Roboto (English)/Roboto-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngrAhsanAli/AALocalizationKit/1133981a974e3e836c1891fcc7753df102a18129/Example/AALocalizationKit/Resources/Fonts/Roboto (English)/Roboto-Bold.ttf -------------------------------------------------------------------------------- /Example/AALocalizationKit/Resources/Fonts/Roboto (English)/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngrAhsanAli/AALocalizationKit/1133981a974e3e836c1891fcc7753df102a18129/Example/AALocalizationKit/Resources/Fonts/Roboto (English)/Roboto-Medium.ttf -------------------------------------------------------------------------------- /Example/AALocalizationKit/Resources/Fonts/Roboto (English)/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngrAhsanAli/AALocalizationKit/1133981a974e3e836c1891fcc7753df102a18129/Example/AALocalizationKit/Resources/Fonts/Roboto (English)/Roboto-Regular.ttf -------------------------------------------------------------------------------- /Example/AALocalizationKit/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // AALocalizationKit 4 | // 5 | // Created by EngrAhsanAli on 06/19/2019. 6 | // Copyright (c) 2019 EngrAhsanAli. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import AALocalizationKit 11 | 12 | class ViewController: UIViewController { 13 | 14 | @IBOutlet weak var langPicker: PickerView! 15 | @IBOutlet weak var locallizedLabel: UILabel! 16 | 17 | override func viewDidLoad() { 18 | super.viewDidLoad() 19 | 20 | setLanguagePicker() 21 | } 22 | 23 | /// Set the language picker 24 | func setLanguagePicker() { 25 | langPicker.setIcon() 26 | langPicker.valueDidSelected = { self.updateAppLanguage($0 as! Int) } 27 | 28 | let languageNames = AALK.bundleLanguageNames 29 | 30 | if languageNames.count > 1 { 31 | langPicker.pickerType = .string(data: languageNames) 32 | langPicker.pickerRow.font = UIFont(name: AALK.configuration.defaultFont, size: 15) 33 | langPicker.text = Locale.aalk_languageName(from: AALK.currentLanguage.rawValue) 34 | } 35 | 36 | let dynamicLabel = UILabel(frame: CGRect.init(x: 0, 37 | y: UIScreen.main.bounds.size.height - 200, 38 | width: UIScreen.main.bounds.size.width, 39 | height: 100)) 40 | dynamicLabel.text = "A dynamic label added programatically" 41 | dynamicLabel.numberOfLines = 0 42 | dynamicLabel.textAlignment = .center 43 | dynamicLabel.textColor = .blue 44 | self.view.addSubview(dynamicLabel) 45 | 46 | } 47 | 48 | override func didReceiveMemoryWarning() { 49 | super.didReceiveMemoryWarning() 50 | } 51 | 52 | 53 | /// Update the language of the application 54 | /// - Parameter index: lang index 55 | func updateAppLanguage(_ index: Int) { 56 | 57 | let lang = AALK.languages[index] 58 | guard AALK.currentLanguage != lang else { return } 59 | 60 | // Reload this view 61 | reloadViewFromNib() 62 | 63 | AALK.setLanguage(language: lang, viewController: { _ in 64 | self.storyboard!.instantiateInitialViewController()! 65 | }) { view in 66 | view.transform = CGAffineTransform(scaleX: 2, y: 2) 67 | view.alpha = 0 68 | } 69 | 70 | print("New Language: ", AALK.appLocale) 71 | 72 | } 73 | 74 | } 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /Example/AALocalizationKit/ar.lproj/LaunchScreen.strings: -------------------------------------------------------------------------------- 1 | 2 | /* Class = "UILabel"; text = " Copyright (c) 2019 AA-Creations. All rights reserved."; ObjectID = "67k-gR-Yf2"; */ 3 | "67k-gR-Yf2.text" = " Copyright (c) 2019 AA-Creations. All rights reserved."; 4 | 5 | /* Class = "UILabel"; text = "AALocalizationKit"; ObjectID = "wzK-ps-t3w"; */ 6 | "wzK-ps-t3w.text" = "AALocalizationKit"; 7 | -------------------------------------------------------------------------------- /Example/AALocalizationKit/ar.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | AALocalizationKit 4 | 5 | Created by Muhammad Ahsan Ali on 2021/03/22. 6 | Copyright © 2021 CocoaPods. All rights reserved. 7 | */ 8 | 9 | "Hello" = "تحية للجميع"; 10 | 11 | "Hi" = "مرحبا"; 12 | 13 | "Write you name here" = "اكتب اسمك هنا"; 14 | 15 | "What's your name?" = "ما اسمك؟"; 16 | 17 | "Greetings to you" = "تحياتي لك"; 18 | 19 | "Select Language" = "اختار اللغة"; 20 | -------------------------------------------------------------------------------- /Example/AALocalizationKit/ar.lproj/Main.strings: -------------------------------------------------------------------------------- 1 | 2 | /* Class = "UISegmentedControl"; K13-CK-xyJ.segmentTitles[0] = "Hello"; ObjectID = "K13-CK-xyJ"; */ 3 | "K13-CK-xyJ.segmentTitles[0]" = "تحية للجميع"; 4 | 5 | /* Class = "UISegmentedControl"; K13-CK-xyJ.segmentTitles[1] = "Hi"; ObjectID = "K13-CK-xyJ"; */ 6 | "K13-CK-xyJ.segmentTitles[1]" = "مرحبا"; 7 | 8 | /* Class = "UITextField"; placeholder = "Write you name here"; ObjectID = "byW-ld-KfO"; */ 9 | "byW-ld-KfO.placeholder" = "اكتب اسمك هنا"; 10 | 11 | /* Class = "UIButton"; normalTitle = "What's your name?"; ObjectID = "cBj-5L-RKr"; */ 12 | "cBj-5L-RKr.normalTitle" = "ما اسمك؟"; 13 | 14 | /* Class = "UINavigationItem"; title = "AALocalizationKit Demo"; ObjectID = "dFn-Ur-N39"; */ 15 | "dFn-Ur-N39.title" = "AALocalizationKit Demo"; 16 | 17 | /* Class = "UILabel"; text = "Greetings to you"; ObjectID = "tQh-SJ-TFH"; */ 18 | "tQh-SJ-TFH.text" = "تحياتي لك"; 19 | 20 | /* Class = "UITextField"; placeholder = "Select Language"; ObjectID = "wEK-2I-EPY"; */ 21 | "wEK-2I-EPY.placeholder" = "اختار اللغة"; 22 | -------------------------------------------------------------------------------- /Example/AALocalizationKit/de.lproj/LaunchScreen.strings: -------------------------------------------------------------------------------- 1 | 2 | /* Class = "UILabel"; text = " Copyright (c) 2019 AA-Creations. All rights reserved."; ObjectID = "67k-gR-Yf2"; */ 3 | "67k-gR-Yf2.text" = " Copyright (c) 2019 AA-Creations. All rights reserved."; 4 | 5 | /* Class = "UILabel"; text = "AALocalizationKit"; ObjectID = "wzK-ps-t3w"; */ 6 | "wzK-ps-t3w.text" = "AALocalizationKit"; 7 | -------------------------------------------------------------------------------- /Example/AALocalizationKit/de.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | AALocalizationKit 4 | 5 | Created by Muhammad Ahsan Ali on 2021/03/22. 6 | Copyright © 2021 CocoaPods. All rights reserved. 7 | */ 8 | 9 | "Hello" = "Hallo, alle miteinander"; 10 | 11 | "Hi" = "Hallo"; 12 | 13 | "Write you name here" = "Schreiben Sie hier Ihren Namen"; 14 | 15 | "What's your name?" = "Wie heißen Sie?"; 16 | 17 | "Greetings to you" = "Grüße dich"; 18 | 19 | "Select Language" = "Sprache auswählen"; 20 | 21 | -------------------------------------------------------------------------------- /Example/AALocalizationKit/de.lproj/Main.strings: -------------------------------------------------------------------------------- 1 | 2 | /* Class = "UISegmentedControl"; K13-CK-xyJ.segmentTitles[0] = "Hello"; ObjectID = "K13-CK-xyJ"; */ 3 | "K13-CK-xyJ.segmentTitles[0]" = "Hallo, alle miteinander"; 4 | 5 | /* Class = "UISegmentedControl"; K13-CK-xyJ.segmentTitles[1] = "Hi"; ObjectID = "K13-CK-xyJ"; */ 6 | "K13-CK-xyJ.segmentTitles[1]" = "Hallo"; 7 | 8 | /* Class = "UITextField"; placeholder = "Write you name here"; ObjectID = "byW-ld-KfO"; */ 9 | "byW-ld-KfO.placeholder" = "Schreiben Sie hier Ihren Namen"; 10 | 11 | /* Class = "UIButton"; normalTitle = "What's your name?"; ObjectID = "cBj-5L-RKr"; */ 12 | "cBj-5L-RKr.normalTitle" = "Wie heißen Sie?"; 13 | 14 | /* Class = "UINavigationItem"; title = "AALocalizationKit Demo"; ObjectID = "dFn-Ur-N39"; */ 15 | "dFn-Ur-N39.title" = "AALocalizationKit Demo"; 16 | 17 | /* Class = "UILabel"; text = "Greetings to you"; ObjectID = "tQh-SJ-TFH"; */ 18 | "tQh-SJ-TFH.text" = "Grüße dich"; 19 | 20 | /* Class = "UITextField"; placeholder = "Select Language"; ObjectID = "wEK-2I-EPY"; */ 21 | "wEK-2I-EPY.placeholder" = "Sprache auswählen"; 22 | -------------------------------------------------------------------------------- /Example/AALocalizationKit/fr.lproj/LaunchScreen.strings: -------------------------------------------------------------------------------- 1 | 2 | /* Class = "UILabel"; text = " Copyright (c) 2019 AA-Creations. All rights reserved."; ObjectID = "67k-gR-Yf2"; */ 3 | "67k-gR-Yf2.text" = " Copyright (c) 2019 AA-Creations. All rights reserved."; 4 | 5 | /* Class = "UILabel"; text = "AALocalizationKit"; ObjectID = "wzK-ps-t3w"; */ 6 | "wzK-ps-t3w.text" = "AALocalizationKit"; 7 | -------------------------------------------------------------------------------- /Example/AALocalizationKit/fr.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | AALocalizationKit 4 | 5 | Created by Muhammad Ahsan Ali on 2021/03/22. 6 | Copyright © 2021 CocoaPods. All rights reserved. 7 | */ 8 | 9 | "Hello" = "Bonjour à tous"; 10 | 11 | "Hi" = "salut"; 12 | 13 | "Write you name here" = "Ecrivez votre nom ici"; 14 | 15 | "What's your name?" = "Quel est ton nom?"; 16 | 17 | "Greetings to you" = "Salutations à vous"; 18 | 19 | "Select Language" = "Choisir la langue"; 20 | -------------------------------------------------------------------------------- /Example/AALocalizationKit/fr.lproj/Main.strings: -------------------------------------------------------------------------------- 1 | 2 | /* Class = "UISegmentedControl"; K13-CK-xyJ.segmentTitles[0] = "Hello"; ObjectID = "K13-CK-xyJ"; */ 3 | "K13-CK-xyJ.segmentTitles[0]" = "Bonjour à tous"; 4 | 5 | /* Class = "UISegmentedControl"; K13-CK-xyJ.segmentTitles[1] = "Hi"; ObjectID = "K13-CK-xyJ"; */ 6 | "K13-CK-xyJ.segmentTitles[1]" = "salut"; 7 | 8 | /* Class = "UITextField"; placeholder = "Write you name here"; ObjectID = "byW-ld-KfO"; */ 9 | "byW-ld-KfO.placeholder" = "Ecrivez votre nom ici"; 10 | 11 | /* Class = "UIButton"; normalTitle = "What's your name?"; ObjectID = "cBj-5L-RKr"; */ 12 | "cBj-5L-RKr.normalTitle" = "Quel est ton nom?"; 13 | 14 | /* Class = "UINavigationItem"; title = "AALocalizationKit Demo"; ObjectID = "dFn-Ur-N39"; */ 15 | "dFn-Ur-N39.title" = "AALocalizationKit Demo"; 16 | 17 | /* Class = "UILabel"; text = "Greetings to you"; ObjectID = "tQh-SJ-TFH"; */ 18 | "tQh-SJ-TFH.text" = "Salutations à vous"; 19 | 20 | /* Class = "UITextField"; placeholder = "Select Language"; ObjectID = "wEK-2I-EPY"; */ 21 | "wEK-2I-EPY.placeholder" = "Choisir la langue"; 22 | -------------------------------------------------------------------------------- /Example/AALocalizationKit/ja.lproj/LaunchScreen.strings: -------------------------------------------------------------------------------- 1 | 2 | /* Class = "UILabel"; text = " Copyright (c) 2019 AA-Creations. All rights reserved."; ObjectID = "67k-gR-Yf2"; */ 3 | "67k-gR-Yf2.text" = " Copyright (c) 2019 AA-Creations. All rights reserved."; 4 | 5 | /* Class = "UILabel"; text = "AALocalizationKit"; ObjectID = "wzK-ps-t3w"; */ 6 | "wzK-ps-t3w.text" = "AALocalizationKit"; 7 | -------------------------------------------------------------------------------- /Example/AALocalizationKit/ja.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | AALocalizationKit 4 | 5 | Created by Muhammad Ahsan Ali on 2021/03/22. 6 | Copyright © 2021 CocoaPods. All rights reserved. 7 | */ 8 | 9 | "Hello" = "こんにちは"; 10 | 11 | "Hi" = "こんにちは、あなた"; 12 | 13 | "Write you name here" = "ここに名前を書いてください"; 14 | 15 | "What's your name?" = "あなたの名前は何ですか?"; 16 | 17 | "Greetings to you" = "あなたへのご挨拶"; 18 | 19 | "Select Language" = "言語を選択する"; 20 | -------------------------------------------------------------------------------- /Example/AALocalizationKit/ja.lproj/Main.strings: -------------------------------------------------------------------------------- 1 | 2 | /* Class = "UISegmentedControl"; K13-CK-xyJ.segmentTitles[0] = "Hello"; ObjectID = "K13-CK-xyJ"; */ 3 | "K13-CK-xyJ.segmentTitles[0]" = "こんにちは"; 4 | 5 | /* Class = "UISegmentedControl"; K13-CK-xyJ.segmentTitles[1] = "Hi"; ObjectID = "K13-CK-xyJ"; */ 6 | "K13-CK-xyJ.segmentTitles[1]" = "こんにちは、あなた"; 7 | 8 | /* Class = "UITextField"; placeholder = "Write you name here"; ObjectID = "byW-ld-KfO"; */ 9 | "byW-ld-KfO.placeholder" = "ここに名前を書いてください"; 10 | 11 | /* Class = "UIButton"; normalTitle = "What's your name?"; ObjectID = "cBj-5L-RKr"; */ 12 | "cBj-5L-RKr.normalTitle" = "あなたの名前は何ですか?"; 13 | 14 | /* Class = "UINavigationItem"; title = "AALocalizationKit Demo"; ObjectID = "dFn-Ur-N39"; */ 15 | "dFn-Ur-N39.title" = "AALocalizationKit Demo"; 16 | 17 | /* Class = "UILabel"; text = "Greetings to you"; ObjectID = "tQh-SJ-TFH"; */ 18 | "tQh-SJ-TFH.text" = "あなたへのご挨拶"; 19 | 20 | /* Class = "UITextField"; placeholder = "Select Language"; ObjectID = "wEK-2I-EPY"; */ 21 | "wEK-2I-EPY.placeholder" = "言語を選択する"; 22 | -------------------------------------------------------------------------------- /Example/AALocalizationKit/zh-Hans.lproj/LaunchScreen.strings: -------------------------------------------------------------------------------- 1 | 2 | /* Class = "UILabel"; text = " Copyright (c) 2019 AA-Creations. All rights reserved."; ObjectID = "67k-gR-Yf2"; */ 3 | "67k-gR-Yf2.text" = " Copyright (c) 2019 AA-Creations. All rights reserved."; 4 | 5 | /* Class = "UILabel"; text = "AALocalizationKit"; ObjectID = "wzK-ps-t3w"; */ 6 | "wzK-ps-t3w.text" = "AALocalizationKit"; 7 | -------------------------------------------------------------------------------- /Example/AALocalizationKit/zh-Hans.lproj/Localizable.strings: -------------------------------------------------------------------------------- 1 | /* 2 | Localizable.strings 3 | AALocalizationKit 4 | 5 | Created by Muhammad Ahsan Ali on 2021/03/22. 6 | Copyright © 2021 CocoaPods. All rights reserved. 7 | */ 8 | 9 | "Hello" = "大家好"; 10 | 11 | "Hi" = "你好"; 12 | 13 | "Write you name here" = "在这里写你的名字"; 14 | 15 | "What's your name?" = "你叫什么名字?"; 16 | 17 | "Greetings to you" = "向你问好"; 18 | 19 | "Select Language" = "选择语言"; 20 | -------------------------------------------------------------------------------- /Example/AALocalizationKit/zh-Hans.lproj/Main.strings: -------------------------------------------------------------------------------- 1 | 2 | /* Class = "UISegmentedControl"; K13-CK-xyJ.segmentTitles[0] = "Hello"; ObjectID = "K13-CK-xyJ"; */ 3 | "K13-CK-xyJ.segmentTitles[0]" = "大家好"; 4 | 5 | /* Class = "UISegmentedControl"; K13-CK-xyJ.segmentTitles[1] = "Hi"; ObjectID = "K13-CK-xyJ"; */ 6 | "K13-CK-xyJ.segmentTitles[1]" = "你好"; 7 | 8 | /* Class = "UITextField"; placeholder = "Write you name here"; ObjectID = "byW-ld-KfO"; */ 9 | "byW-ld-KfO.placeholder" = "在这里写你的名字"; 10 | 11 | /* Class = "UIButton"; normalTitle = "What's your name?"; ObjectID = "cBj-5L-RKr"; */ 12 | "cBj-5L-RKr.normalTitle" = "你叫什么名字?"; 13 | 14 | /* Class = "UINavigationItem"; title = "AALocalizationKit Demo"; ObjectID = "dFn-Ur-N39"; */ 15 | "dFn-Ur-N39.title" = "AALocalizationKit Demo"; 16 | 17 | /* Class = "UILabel"; text = "Greetings to you"; ObjectID = "tQh-SJ-TFH"; */ 18 | "tQh-SJ-TFH.text" = "向你问好"; 19 | 20 | /* Class = "UITextField"; placeholder = "Select Language"; ObjectID = "wEK-2I-EPY"; */ 21 | "wEK-2I-EPY.placeholder" = "选择语言"; 22 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | 3 | target 'AALocalizationKit_Example' do 4 | pod 'AALocalizationKit', :path => '../' 5 | pod 'AAPickerView' 6 | end 7 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - AALocalizationKit (1.5.1) 3 | - AAPickerView (1.0) 4 | 5 | DEPENDENCIES: 6 | - AALocalizationKit (from `../`) 7 | - AAPickerView 8 | 9 | SPEC REPOS: 10 | https://github.com/CocoaPods/Specs.git: 11 | - AAPickerView 12 | 13 | EXTERNAL SOURCES: 14 | AALocalizationKit: 15 | :path: "../" 16 | 17 | SPEC CHECKSUMS: 18 | AALocalizationKit: 07233cf6b9f727ad5f5590788aa261992ca15df8 19 | AAPickerView: 32334007f7bb541db2b2f8663806f0a6636fdfeb 20 | 21 | PODFILE CHECKSUM: 0cb0b083a2cd5474705a0b0eb128b310065026fa 22 | 23 | COCOAPODS: 1.10.1 24 | -------------------------------------------------------------------------------- /Example/Pods/AAPickerView/AAPickerView/Classes/AAPickerView+Helper.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AAPickerView+Helper.swift 3 | // AAPickerView 4 | // 5 | // Created by Engr. Ahsan Ali on 04/02/2017. 6 | // Copyright (c) 2017 AA-Creations. All rights reserved. 7 | // 8 | 9 | 10 | /// Picker View type 11 | /// 12 | /// - StringPicker: string picker 13 | /// - DatePicker: date picker 14 | public enum AAPickerType { 15 | case string(data: [String]) 16 | case date 17 | } 18 | 19 | //MARK: UIPickerViewDelegate 20 | extension AAPickerView: UIPickerViewDelegate, UIPickerViewDataSource { 21 | public func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int { 22 | return stringPickerData.count 23 | } 24 | 25 | public func numberOfComponents(in pickerView: UIPickerView) -> Int { 26 | return 1 27 | } 28 | 29 | open func pickerView(_ pickerView: UIPickerView, viewForRow row: Int, forComponent component: Int, reusing view: UIView?) -> UIView { 30 | let label = pickerRow 31 | label.text = stringPickerData[row] 32 | return label 33 | } 34 | 35 | 36 | public func pickerView(_ pickerView: UIPickerView, rowHeightForComponent component: Int) -> CGFloat { 37 | return heightForRow 38 | } 39 | 40 | public func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) { 41 | valueDidChange?(row) 42 | sendActions(for: .valueChanged) 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /Example/Pods/AAPickerView/AAPickerView/Classes/AAPickerView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AAPickerView.swift 3 | // AAPickerView 4 | // 5 | // Created by Engr. Ahsan Ali on 01/06/2017. 6 | // Copyright (c) 2017 AA-Creations. All rights reserved. 7 | // 8 | 9 | /// MARK:- AAPickerView 10 | open class AAPickerView: UITextField { 11 | 12 | /// Callback for end editing 13 | open var valueDidSelected: ((Any) -> Void)? 14 | 15 | /// Callback for value change 16 | open var valueDidChange: ((Any) -> Void)? 17 | 18 | open var pickerType: AAPickerType = .date { 19 | 20 | didSet { 21 | 22 | switch pickerType { 23 | case .date: 24 | datePicker = UIDatePicker() 25 | case .string(let stringData): 26 | stringPicker = UIPickerView() 27 | stringPickerData = stringData 28 | } 29 | 30 | inputAccessoryView = toolbar 31 | } 32 | } 33 | 34 | // For DatePicker 35 | open var dateFormatter = DateFormatter() 36 | 37 | open var datePicker: UIDatePicker? { 38 | get { 39 | return self.inputView as? UIDatePicker 40 | } 41 | set { 42 | inputView = newValue 43 | dateFormatter.dateFormat = "MM/dd/YYYY" 44 | 45 | } 46 | } 47 | 48 | // For String Picker 49 | 50 | var stringPickerData = [String]() 51 | 52 | open var heightForRow: CGFloat = 30 53 | 54 | open var pickerRow: UILabel { 55 | let pickerLabel = UILabel() 56 | pickerLabel.textColor = .black 57 | pickerLabel.font = UIFont(name: "HelveticaNeue", size: 20) 58 | pickerLabel.textAlignment = .center 59 | pickerLabel.sizeToFit() 60 | return pickerLabel 61 | } 62 | 63 | open var stringPicker: UIPickerView? { 64 | get { 65 | return self.inputView as? UIPickerView 66 | } 67 | set(picker) { 68 | picker?.delegate = self 69 | inputView = picker 70 | } 71 | } 72 | 73 | 74 | // Configurations 75 | 76 | open var toolbar: UIToolbar { 77 | 78 | let toolBar = UIToolbar() 79 | toolBar.barStyle = .default 80 | toolBar.isTranslucent = true 81 | toolBar.tintColor = .blue 82 | toolBar.sizeToFit() 83 | 84 | let doneButton = UIBarButtonItem(barButtonSystemItem: .done, 85 | target: self, 86 | action: #selector(doneAction)) 87 | 88 | let spaceButton = UIBarButtonItem(barButtonSystemItem: .flexibleSpace, 89 | target: nil, 90 | action: nil) 91 | 92 | let cancelButton = UIBarButtonItem(barButtonSystemItem: .cancel, 93 | target: self, 94 | action: #selector(cancelAction)) 95 | 96 | toolBar.setItems([cancelButton, spaceButton, doneButton], animated: false) 97 | toolBar.isUserInteractionEnabled = true 98 | inputAccessoryView = toolBar 99 | return toolBar 100 | } 101 | 102 | 103 | @objc func doneAction() { 104 | 105 | switch pickerType { 106 | case .date: 107 | 108 | let date = datePicker!.date 109 | self.text = dateFormatter.string(from: date) 110 | valueDidSelected?(date) 111 | 112 | case .string: 113 | let row = stringPicker!.selectedRow(inComponent: 0) 114 | self.text = stringPickerData[row] 115 | valueDidSelected?(row) 116 | 117 | } 118 | 119 | sendActions(for: .editingDidEnd) 120 | resignFirstResponder() 121 | } 122 | 123 | @objc func cancelAction() { 124 | resignFirstResponder() 125 | } 126 | 127 | } 128 | -------------------------------------------------------------------------------- /Example/Pods/AAPickerView/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017 Engr. Ahsan Ali 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Example/Pods/AAPickerView/README.md: -------------------------------------------------------------------------------- 1 | # Table of Contents 2 | 3 | - [AAPickerView](#section-id-4) 4 | - [Description](#section-id-10) 5 | - [Demonstration](#section-id-16) 6 | - [Requirements](#section-id-26) 7 | - [Installation](#section-id-32) 8 | - [CocoaPods](#section-id-37) 9 | - [Carthage](#section-id-63) 10 | - [Manual Installation](#section-id-82) 11 | - [Getting Started](#section-id-87) 12 | - [Create instance of AAPickerView](#section-id-90) 13 | - [Define picker type](#section-id-104) 14 | - [Customise the toolbar](#section-id-112) 15 | - [Customise StringPicker Label](#section-id-132) 16 | - [Customise UIDatePicker & DateFormatter](#section-id-150) 17 | - [Listen changes thorough callbacks](#section-id-151) 18 | - [Contributions & License](#section-id-156) 19 | 20 | 21 |
22 | 23 | #AAPickerView 24 | 25 | [![Swift 3.0](https://img.shields.io/badge/Swift-3.0-orange.svg?style=flat)](https://developer.apple.com/swift/) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![CocoaPods](https://img.shields.io/cocoapods/v/AAPickerView.svg)](http://cocoadocs.org/docsets/AAPickerView) [![License MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=flat)](https://github.com/Carthage/Carthage) [![Build Status](https://travis-ci.org/EngrAhsanAli/AAPickerView.svg?branch=master)](https://travis-ci.org/EngrAhsanAli/AAPickerView) 26 | ![License MIT](https://img.shields.io/github/license/mashape/apistatus.svg) [![CocoaPods](https://img.shields.io/cocoapods/p/AAPickerView.svg)]() 27 | 28 | 29 |
30 | 31 | ##Description 32 | 33 | 34 | AAPickerView is simple and easy-to-use implementation for `UITextField` to use as `UIPickerView` and `UIDatePicker` written in swift. It allows to transform `UITextField` as `UIPickerView` and `UIDatePicker` to pick data easily. It is designed to present a picker view to select data in `UITextField`. 35 | 36 | 37 |
38 | 39 | ##Demonstration 40 | 41 | 42 | 43 | ![](https://github.com/EngrAhsanAli/AAPickerView/blob/master/Screenshots/demo.gif) 44 | 45 | 46 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 47 | 48 | 49 |
50 | 51 | ##Requirements 52 | 53 | - iOS 8.0+ 54 | - Xcode 8.0+ 55 | 56 | 57 |
58 | 59 | # Installation 60 | 61 | `AAPickerView` can be installed using CocoaPods, Carthage, or manually. 62 | 63 | 64 |
65 | 66 | ##CocoaPods 67 | 68 | `AAPickerView` is available through [CocoaPods](http://cocoapods.org). To install CocoaPods, run: 69 | 70 | `$ gem install cocoapods` 71 | 72 | Then create a Podfile with the following contents: 73 | 74 | ``` 75 | source 'https://github.com/CocoaPods/Specs.git' 76 | platform :ios, '8.0' 77 | use_frameworks! 78 | 79 | target '' do 80 | // Swift 3.2+ Compatibility 81 | pod 'AAPickerView' 82 | // Swift 4 Compatibility 83 | pod 'AAPickerView', '~> 0.1.2' 84 | end 85 | 86 | ``` 87 | 88 | Finally, run the following command to install it: 89 | ``` 90 | $ pod install 91 | ``` 92 | 93 | 94 | 95 |
96 | 97 | ##Carthage 98 | 99 | To install Carthage, run (using Homebrew): 100 | ``` 101 | $ brew update 102 | $ brew install carthage 103 | ``` 104 | Then add the following line to your Cartfile: 105 | 106 | ``` 107 | github "EngrAhsanAli/AAPickerView" "master" 108 | ``` 109 | 110 | Then import the library in all files where you use it: 111 | ```swift 112 | import AAPickerView 113 | ``` 114 | 115 | 116 |
117 | 118 | ##Manual Installation 119 | 120 | If you prefer not to use either of the above mentioned dependency managers, you can integrate `AAPickerView` into your project manually by adding the files contained in the Classes folder to your project. 121 | 122 | 123 |
124 | 125 | #Getting Started 126 | ---------- 127 | 128 |
129 | 130 | ##Create instance of AAPickerView 131 | 132 | You just need to assign `AAPickerView` class to your `UITextField` and make the outlet: 133 | ```swift 134 | @IBOutlet weak var picker: AAPickerView! 135 | ``` 136 | 137 | Now your `UITextField` is transformed as a picker view as `AAPickerView`. 138 | 139 | 140 |
141 | 142 | ##Define picker type 143 | 144 | Define type of picker you want to use in your text field. There are two types of pickers available in `AAPickerView` that are: 145 | 146 | - `StringPicker` for `UIPickerView` 147 | - `DatePicker` for `UIDatePicker` 148 | 149 | Assign one of them as follow: 150 | 151 | ```swift 152 | picker1.pickerType = .StringPicker 153 | picker2.pickerType = .DatePicker 154 | ``` 155 | 156 |
157 | 158 | ##Customise the toolbar 159 | 160 | You can change `UIToolbar` colours like: 161 | ```swift 162 | picker.toolbar.barTintColor = .darkGray 163 | picker.toolbar.tintColor = .black 164 | ``` 165 | 166 |
167 | 168 | ##Customise StringPicker Label 169 | 170 | You can get and customise the `StringPicker` label as `UILabel`: 171 | ```swift 172 | let label = picker.pickerRow 173 | label.font = UIFont(name: "American Typewriter", size: 30) 174 | ``` 175 | 176 |
177 | 178 | ##Customise UIDatePicker & DateFormatter 179 | 180 | You can get your `UIDatePicker` and `DateFormatter` which is using behind your `UITextField` as: 181 | ```swift 182 | let datePicker = picker.datePicker 183 | datePicker?.datePickerMode = .date 184 | 185 | let dateFormatter = picker.dateFormatter 186 | dateFormatter.dateFormat = "dd/MM/YYYY" 187 | ``` 188 | 189 | 190 |
191 | 192 | ##Listen changes thorough callbacks 193 | 194 | You can listen the changes of data simply by using the following callback methods: 195 | 196 | - StringPicker: 197 | ```swift 198 | picker.stringDidChange = { index in 199 | print("selectedString ", self.stringData[index]) 200 | } 201 | ``` 202 | 203 | - DatePicker 204 | ```swift 205 | picker.dateDidChange = { date in 206 | print("selectedDate ", date ) 207 | } 208 | ``` 209 | 210 | 211 |
212 | 213 | #Contributions & License 214 | 215 | `AAPickerView` is available under the MIT license. See the [LICENSE](./LICENSE) file for more info. 216 | 217 | Pull requests are welcome! The best contributions will consist of substitutions or configurations for classes/methods known to block the main thread during a typical app lifecycle. 218 | 219 | I would love to know if you are using `AAPickerView` in your app, send an email to [Engr. Ahsan Ali](mailto:hafiz.m.ahsan.ali@gmail.com) 220 | 221 | -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/AALocalizationKit.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "AALocalizationKit", 3 | "version": "1.5.1", 4 | "summary": "AALocalizationKit is a great localization manager that is written in pure swift.", 5 | "description": "AALocalizationKit is really helpful to maintain multiple languages in the application with their custom language fonts and an ability to change the language within your application! With this, you can easily configured framework to configure multiple languages in the iOS application.", 6 | "homepage": "https://github.com/EngrAhsanAli/AALocalizationKit", 7 | "license": { 8 | "type": "MIT", 9 | "file": "LICENSE" 10 | }, 11 | "authors": { 12 | "EngrAhsanAli": "hafiz.m.ahsan.ali@gmail.com" 13 | }, 14 | "source": { 15 | "git": "https://github.com/EngrAhsanAli/AALocalizationKit.git", 16 | "tag": "1.5.1" 17 | }, 18 | "platforms": { 19 | "ios": "9.0" 20 | }, 21 | "swift_versions": "5.0", 22 | "source_files": "AALocalizationKit/Classes/**/*", 23 | "swift_version": "5.0" 24 | } 25 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - AALocalizationKit (1.5.1) 3 | - AAPickerView (1.0) 4 | 5 | DEPENDENCIES: 6 | - AALocalizationKit (from `../`) 7 | - AAPickerView 8 | 9 | SPEC REPOS: 10 | https://github.com/CocoaPods/Specs.git: 11 | - AAPickerView 12 | 13 | EXTERNAL SOURCES: 14 | AALocalizationKit: 15 | :path: "../" 16 | 17 | SPEC CHECKSUMS: 18 | AALocalizationKit: 07233cf6b9f727ad5f5590788aa261992ca15df8 19 | AAPickerView: 32334007f7bb541db2b2f8663806f0a6636fdfeb 20 | 21 | PODFILE CHECKSUM: 0cb0b083a2cd5474705a0b0eb128b310065026fa 22 | 23 | COCOAPODS: 1.10.1 24 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/AALocalizationKit/AALocalizationKit-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 | FMWK 17 | CFBundleShortVersionString 18 | 1.5.1 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/AALocalizationKit/AALocalizationKit-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_AALocalizationKit : NSObject 3 | @end 4 | @implementation PodsDummy_AALocalizationKit 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/AALocalizationKit/AALocalizationKit-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/AALocalizationKit/AALocalizationKit-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double AALocalizationKitVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char AALocalizationKitVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/AALocalizationKit/AALocalizationKit.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/AALocalizationKit 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 9 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | SKIP_INSTALL = YES 12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/AALocalizationKit/AALocalizationKit.modulemap: -------------------------------------------------------------------------------- 1 | framework module AALocalizationKit { 2 | umbrella header "AALocalizationKit-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/AALocalizationKit/AALocalizationKit.release.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/AALocalizationKit 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 9 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | SKIP_INSTALL = YES 12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/AALocalizationKit/AALocalizationKit.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/AALocalizationKit 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/AAPickerView/AAPickerView-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 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/AAPickerView/AAPickerView-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_AAPickerView : NSObject 3 | @end 4 | @implementation PodsDummy_AAPickerView 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/AAPickerView/AAPickerView-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/AAPickerView/AAPickerView-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double AAPickerViewVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char AAPickerViewVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/AAPickerView/AAPickerView.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/AAPickerView 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/AAPickerView 9 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | SKIP_INSTALL = YES 12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/AAPickerView/AAPickerView.modulemap: -------------------------------------------------------------------------------- 1 | framework module AAPickerView { 2 | umbrella header "AAPickerView-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/AAPickerView/AAPickerView.release.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/AAPickerView 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/AAPickerView 9 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | SKIP_INSTALL = YES 12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/AAPickerView/AAPickerView.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/AAPickerView 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/AAPickerView 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-AALocalizationKit_Example/Pods-AALocalizationKit_Example-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 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-AALocalizationKit_Example/Pods-AALocalizationKit_Example-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## AALocalizationKit 5 | 6 | Copyright (c) 2019 EngrAhsanAli 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | 27 | ## AAPickerView 28 | 29 | Copyright (c) 2017 Engr. Ahsan Ali 30 | 31 | Permission is hereby granted, free of charge, to any person obtaining a copy 32 | of this software and associated documentation files (the "Software"), to deal 33 | in the Software without restriction, including without limitation the rights 34 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 35 | copies of the Software, and to permit persons to whom the Software is 36 | furnished to do so, subject to the following conditions: 37 | 38 | The above copyright notice and this permission notice shall be included in 39 | all copies or substantial portions of the Software. 40 | 41 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 42 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 43 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 44 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 45 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 46 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 47 | THE SOFTWARE. 48 | 49 | Generated by CocoaPods - https://cocoapods.org 50 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-AALocalizationKit_Example/Pods-AALocalizationKit_Example-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright (c) 2019 EngrAhsanAli <hafiz.m.ahsan.ali@gmail.com> 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in 27 | all copies or substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | 37 | License 38 | MIT 39 | Title 40 | AALocalizationKit 41 | Type 42 | PSGroupSpecifier 43 | 44 | 45 | FooterText 46 | Copyright (c) 2017 Engr. Ahsan Ali <hafiz.m.ahsan.ali@gmail.com> 47 | 48 | Permission is hereby granted, free of charge, to any person obtaining a copy 49 | of this software and associated documentation files (the "Software"), to deal 50 | in the Software without restriction, including without limitation the rights 51 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 52 | copies of the Software, and to permit persons to whom the Software is 53 | furnished to do so, subject to the following conditions: 54 | 55 | The above copyright notice and this permission notice shall be included in 56 | all copies or substantial portions of the Software. 57 | 58 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 59 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 60 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 61 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 62 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 63 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 64 | THE SOFTWARE. 65 | 66 | License 67 | MIT 68 | Title 69 | AAPickerView 70 | Type 71 | PSGroupSpecifier 72 | 73 | 74 | FooterText 75 | Generated by CocoaPods - https://cocoapods.org 76 | Title 77 | 78 | Type 79 | PSGroupSpecifier 80 | 81 | 82 | StringsTable 83 | Acknowledgements 84 | Title 85 | Acknowledgements 86 | 87 | 88 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-AALocalizationKit_Example/Pods-AALocalizationKit_Example-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_AALocalizationKit_Example : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_AALocalizationKit_Example 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-AALocalizationKit_Example/Pods-AALocalizationKit_Example-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | function on_error { 7 | echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" 8 | } 9 | trap 'on_error $LINENO' ERR 10 | 11 | if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then 12 | # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy 13 | # frameworks to, so exit 0 (signalling the script phase was successful). 14 | exit 0 15 | fi 16 | 17 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 18 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 19 | 20 | COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" 21 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 22 | BCSYMBOLMAP_DIR="BCSymbolMaps" 23 | 24 | 25 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 26 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 27 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 28 | 29 | # Copies and strips a vendored framework 30 | install_framework() 31 | { 32 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 33 | local source="${BUILT_PRODUCTS_DIR}/$1" 34 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 35 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 36 | elif [ -r "$1" ]; then 37 | local source="$1" 38 | fi 39 | 40 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 41 | 42 | if [ -L "${source}" ]; then 43 | echo "Symlinked..." 44 | source="$(readlink "${source}")" 45 | fi 46 | 47 | if [ -d "${source}/${BCSYMBOLMAP_DIR}" ]; then 48 | # Locate and install any .bcsymbolmaps if present, and remove them from the .framework before the framework is copied 49 | find "${source}/${BCSYMBOLMAP_DIR}" -name "*.bcsymbolmap"|while read f; do 50 | echo "Installing $f" 51 | install_bcsymbolmap "$f" "$destination" 52 | rm "$f" 53 | done 54 | rmdir "${source}/${BCSYMBOLMAP_DIR}" 55 | fi 56 | 57 | # Use filter instead of exclude so missing patterns don't throw errors. 58 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 59 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 60 | 61 | local basename 62 | basename="$(basename -s .framework "$1")" 63 | binary="${destination}/${basename}.framework/${basename}" 64 | 65 | if ! [ -r "$binary" ]; then 66 | binary="${destination}/${basename}" 67 | elif [ -L "${binary}" ]; then 68 | echo "Destination binary is symlinked..." 69 | dirname="$(dirname "${binary}")" 70 | binary="${dirname}/$(readlink "${binary}")" 71 | fi 72 | 73 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 74 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 75 | strip_invalid_archs "$binary" 76 | fi 77 | 78 | # Resign the code if required by the build settings to avoid unstable apps 79 | code_sign_if_enabled "${destination}/$(basename "$1")" 80 | 81 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 82 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 83 | local swift_runtime_libs 84 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u) 85 | for lib in $swift_runtime_libs; do 86 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 87 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 88 | code_sign_if_enabled "${destination}/${lib}" 89 | done 90 | fi 91 | } 92 | # Copies and strips a vendored dSYM 93 | install_dsym() { 94 | local source="$1" 95 | warn_missing_arch=${2:-true} 96 | if [ -r "$source" ]; then 97 | # Copy the dSYM into the targets temp dir. 98 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" 99 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" 100 | 101 | local basename 102 | basename="$(basename -s .dSYM "$source")" 103 | binary_name="$(ls "$source/Contents/Resources/DWARF")" 104 | binary="${DERIVED_FILES_DIR}/${basename}.dSYM/Contents/Resources/DWARF/${binary_name}" 105 | 106 | # Strip invalid architectures from the dSYM. 107 | if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then 108 | strip_invalid_archs "$binary" "$warn_missing_arch" 109 | fi 110 | if [[ $STRIP_BINARY_RETVAL == 0 ]]; then 111 | # Move the stripped file into its final destination. 112 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" 113 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.dSYM" "${DWARF_DSYM_FOLDER_PATH}" 114 | else 115 | # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. 116 | touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.dSYM" 117 | fi 118 | fi 119 | } 120 | 121 | # Used as a return value for each invocation of `strip_invalid_archs` function. 122 | STRIP_BINARY_RETVAL=0 123 | 124 | # Strip invalid architectures 125 | strip_invalid_archs() { 126 | binary="$1" 127 | warn_missing_arch=${2:-true} 128 | # Get architectures for current target binary 129 | binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" 130 | # Intersect them with the architectures we are building for 131 | intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" 132 | # If there are no archs supported by this binary then warn the user 133 | if [[ -z "$intersected_archs" ]]; then 134 | if [[ "$warn_missing_arch" == "true" ]]; then 135 | echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." 136 | fi 137 | STRIP_BINARY_RETVAL=1 138 | return 139 | fi 140 | stripped="" 141 | for arch in $binary_archs; do 142 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then 143 | # Strip non-valid architectures in-place 144 | lipo -remove "$arch" -output "$binary" "$binary" 145 | stripped="$stripped $arch" 146 | fi 147 | done 148 | if [[ "$stripped" ]]; then 149 | echo "Stripped $binary of architectures:$stripped" 150 | fi 151 | STRIP_BINARY_RETVAL=0 152 | } 153 | 154 | # Copies the bcsymbolmap files of a vendored framework 155 | install_bcsymbolmap() { 156 | local bcsymbolmap_path="$1" 157 | local destination="${BUILT_PRODUCTS_DIR}" 158 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"" 159 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}" 160 | } 161 | 162 | # Signs a framework with the provided identity 163 | code_sign_if_enabled() { 164 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 165 | # Use the current code_sign_identity 166 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 167 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" 168 | 169 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 170 | code_sign_cmd="$code_sign_cmd &" 171 | fi 172 | echo "$code_sign_cmd" 173 | eval "$code_sign_cmd" 174 | fi 175 | } 176 | 177 | if [[ "$CONFIGURATION" == "Debug" ]]; then 178 | install_framework "${BUILT_PRODUCTS_DIR}/AALocalizationKit/AALocalizationKit.framework" 179 | install_framework "${BUILT_PRODUCTS_DIR}/AAPickerView/AAPickerView.framework" 180 | fi 181 | if [[ "$CONFIGURATION" == "Release" ]]; then 182 | install_framework "${BUILT_PRODUCTS_DIR}/AALocalizationKit/AALocalizationKit.framework" 183 | install_framework "${BUILT_PRODUCTS_DIR}/AAPickerView/AAPickerView.framework" 184 | fi 185 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 186 | wait 187 | fi 188 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-AALocalizationKit_Example/Pods-AALocalizationKit_Example-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_AALocalizationKit_ExampleVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_AALocalizationKit_ExampleVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-AALocalizationKit_Example/Pods-AALocalizationKit_Example.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/AALocalizationKit" "${PODS_CONFIGURATION_BUILD_DIR}/AAPickerView" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/AALocalizationKit/AALocalizationKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/AAPickerView/AAPickerView.framework/Headers" 6 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 7 | OTHER_LDFLAGS = $(inherited) -framework "AALocalizationKit" -framework "AAPickerView" 8 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 9 | PODS_BUILD_DIR = ${BUILD_DIR} 10 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 11 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 12 | PODS_ROOT = ${SRCROOT}/Pods 13 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 14 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 15 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-AALocalizationKit_Example/Pods-AALocalizationKit_Example.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_AALocalizationKit_Example { 2 | umbrella header "Pods-AALocalizationKit_Example-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-AALocalizationKit_Example/Pods-AALocalizationKit_Example.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/AALocalizationKit" "${PODS_CONFIGURATION_BUILD_DIR}/AAPickerView" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/AALocalizationKit/AALocalizationKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/AAPickerView/AAPickerView.framework/Headers" 6 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 7 | OTHER_LDFLAGS = $(inherited) -framework "AALocalizationKit" -framework "AAPickerView" 8 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 9 | PODS_BUILD_DIR = ${BUILD_DIR} 10 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 11 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 12 | PODS_ROOT = ${SRCROOT}/Pods 13 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 14 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 15 | -------------------------------------------------------------------------------- /Example/Tests/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 | -------------------------------------------------------------------------------- /Example/Tests/Tests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import AALocalizationKit 3 | 4 | class Tests: XCTestCase { 5 | 6 | override func setUp() { 7 | super.setUp() 8 | // Put setup code here. This method is called before the invocation of each test method in the class. 9 | } 10 | 11 | override func tearDown() { 12 | // Put teardown code here. This method is called after the invocation of each test method in the class. 13 | super.tearDown() 14 | } 15 | 16 | func testExample() { 17 | // This is an example of a functional test case. 18 | XCTAssert(true, "Pass") 19 | } 20 | 21 | func testPerformanceExample() { 22 | // This is an example of a performance test case. 23 | self.measure() { 24 | // Put the code you want to measure the time of here. 25 | } 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2019 EngrAhsanAli 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![](https://github.com/EngrAhsanAli/AALocalizationKit/blob/master/AALocalizationKit.png) 2 | 3 | # Table of Contents 4 | 5 | - [AALocalizationKit](#section-id-4) 6 | - [Description](#section-id-10) 7 | - [Demonstration](#section-id-16) 8 | - [Requirements](#section-id-26) 9 | - [Installation](#section-id-32) 10 | - [CocoaPods](#section-id-37) 11 | - [Carthage](#section-id-63) 12 | - [Manual Installation](#section-id-82) 13 | - [Getting Started](#section-id-87) 14 | - [Contributions & License](#section-id-156) 15 | 16 | 17 |
18 | 19 | #AALocalizationKit 20 | 21 | [![Swift 5.0](https://img.shields.io/badge/Swift-5.1-orange.svg?style=flat)](https://developer.apple.com/swift/) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![CocoaPods](https://img.shields.io/cocoapods/v/AALocalizationKit.svg)](http://cocoadocs.org/docsets/AALocalizationKit) [![License MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=flat)](https://github.com/Carthage/Carthage) [![Build Status](https://travis-ci.org/EngrAhsanAli/AALocalizationKit.svg?branch=master)](https://travis-ci.org/EngrAhsanAli/AALocalizationKit) 22 | ![License MIT](https://img.shields.io/github/license/mashape/apistatus.svg) [![CocoaPods](https://img.shields.io/cocoapods/p/AALocalizationKit.svg)]() 23 | 24 | 25 |
26 | 27 | ##Description 28 | 29 | AALocalizationKit is really helpful to maintain multiple languages in the application with their custom language fonts and an ability to change the language within your application! 30 | 31 | ![](https://github.com/EngrAhsanAli/AALocalizationKit/blob/master/Screenshots/Demo.png) 32 | 33 |
34 | 35 | ##Demonstration 36 | 37 | `AALocalizationKit` is easily configured framework to configure multiple languages in the iOS application. 38 | 39 | ![](https://github.com/EngrAhsanAli/AALocalizationKit/blob/master/Screenshots/Demo.gif) 40 | 41 | 42 | 43 | 44 | 45 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 46 | 47 | 48 |
49 | 50 | ##Requirements 51 | 52 | - iOS 10.0+ 53 | - Xcode 11.0+ 54 | - Swift 5+ 55 | 56 |
57 | 58 | # Installation 59 | 60 | `AALocalizationKit` can be installed using CocoaPods, Carthage, or manually. 61 | 62 | 63 |
64 | 65 | ##CocoaPods 66 | 67 | `AALocalizationKit` is available through [CocoaPods](http://cocoapods.org). To install CocoaPods, run: 68 | 69 | `$ gem install cocoapods` 70 | 71 | Then create a Podfile with the following contents: 72 | 73 | ``` 74 | source 'https://github.com/CocoaPods/Specs.git' 75 | platform :ios, '10.0' 76 | use_frameworks! 77 | 78 | target '' do 79 | pod 'AALocalizationKit' 80 | end 81 | 82 | ``` 83 | 84 | Finally, run the following command to install it: 85 | ``` 86 | $ pod install 87 | ``` 88 | 89 | 90 | 91 |
92 | 93 | ##Carthage 94 | 95 | To install Carthage, run (using Homebrew): 96 | ``` 97 | $ brew update 98 | $ brew install carthage 99 | ``` 100 | Then add the following line to your Cartfile: 101 | 102 | ``` 103 | github "EngrAhsanAli/AALocalizationKit" "master" 104 | ``` 105 | 106 | Then import the library in all files where you use it: 107 | ```swift 108 | import AALocalizationKit 109 | ``` 110 | 111 | 112 |
113 | 114 | ##Manual Installation 115 | 116 | If you prefer not to use either of the above mentioned dependency managers, you can integrate `AALocalizationKit` into your project manually by adding the files contained in the Classes folder to your project. 117 | 118 | 119 |
120 | 121 | #Getting Started 122 | ---------- 123 | 124 | Just need to configure the supporting languages for *Localization* within your the iOS application in you **AppDelegate** `didFinishLaunchingWithOptions` method. 125 | 126 | Following is the example to configure this with following languages support. 127 | 128 |
129 | 130 | 131 | 132 | **Usage**: 133 | ```swift 134 | 135 | func configureAALK() { 136 | let languageFont: [AALanguage : [UIFont.Weight : String]] = [ 137 | .ar : [.regular: "Jomhuria"], 138 | 139 | .zhHans : [.regular: "Chibrush"], 140 | 141 | .fr : [.regular: "MuchaFrenchCapitals"], 142 | 143 | .de : [.regular: "LemonadeStand"], 144 | 145 | .en : [.regular: "Roboto-Regular", 146 | .medium: "Roboto-Medium", 147 | .bold: "Roboto-Bold"], 148 | 149 | .ja : [.regular: "NotoSerifJP-Regular", 150 | .medium: "NotoSerifJP-Medium", 151 | .bold: "NotoSerifJP-Bold"] 152 | ] 153 | 154 | AALK.configuration.languageFont = languageFont 155 | AALK.configuration.defaultFont = "Roboto" 156 | } 157 | ``` 158 | 159 | Now just update the language in your view controller 160 | ```swift 161 | let languageNames = AALK.bundleLanguageNames // get all bundle languages 162 | let lang = AALK.languages[index] // where index is the language index for specific langauge 163 | AALK.currentLanguage = lang // Set the language within your application 164 | 165 | /// NOW YOU JUST NEED TO RECALL YOUR VIEW OR VIEW CONTROLLER TO SEE THE CHANGES 166 | ``` 167 | 168 | 169 | 170 |
171 | 172 | #Contributions & License 173 | 174 | `AALocalizationKit` is available under the MIT license. See the [LICENSE](./LICENSE) file for more info. 175 | 176 | Pull requests are welcome! The best contributions will consist of substitutions or configurations for classes/methods known to block the main thread during a typical app lifecycle. 177 | 178 | I would love to know if you are using `AALocalizationKit` in your app, send an email to [Engr. Ahsan Ali](mailto:hafiz.m.ahsan.ali@gmail.com) 179 | -------------------------------------------------------------------------------- /Screenshots/Demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngrAhsanAli/AALocalizationKit/1133981a974e3e836c1891fcc7753df102a18129/Screenshots/Demo.gif -------------------------------------------------------------------------------- /Screenshots/Demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EngrAhsanAli/AALocalizationKit/1133981a974e3e836c1891fcc7753df102a18129/Screenshots/Demo.png -------------------------------------------------------------------------------- /_Pods.xcodeproj: -------------------------------------------------------------------------------- 1 | Example/Pods/Pods.xcodeproj --------------------------------------------------------------------------------