Skip to content

Commit

Permalink
fixes ability to set the default language
Browse files Browse the repository at this point in the history
  • Loading branch information
dark2torch committed Jan 14, 2019
1 parent 6aba265 commit 9b364f3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
IPHONEOS_DEPLOYMENT_TARGET = 9;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -312,7 +312,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
IPHONEOS_DEPLOYMENT_TARGET = 9;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand All @@ -326,6 +326,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = 5YP97VN386;
INFOPLIST_FILE = LocalizationHelperDemo/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.whitetorch.LocalizationHelperDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -339,6 +340,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = 5YP97VN386;
INFOPLIST_FILE = LocalizationHelperDemo/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.whitetorch.LocalizationHelperDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, MOLHResetable {

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
MOLHLanguage.setDefaultLanguage("ar")
MOLH.shared.activate(true)
MOLH.shared.specialKeyWords = ["Cancel","Done"]
return true
Expand Down
4 changes: 2 additions & 2 deletions MOLH.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Pod::Spec.new do |s|


s.name = "MOLH"
s.version = "v0.4"
s.version = "0.5"
s.summary = "Localization helper for iOS apps mainly focusing on the LTR/RTL issue Edit"

s.description = <<-DESC
Expand All @@ -22,7 +22,7 @@ s.social_media_url = "http://twitter.com/dark_torch"
s.platform = :ios, "9.0"


s.source = { :git => "https://github.com/MoathOthman/MOLH.git", :tag => s.version.to_s }
s.source = { :git => "https://github.com/MoathOthman/MOLH.git", :tag => "v"+s.version.to_s }


s.source_files = "MOLH/*.swift"
Expand Down
2 changes: 1 addition & 1 deletion MOLH/MOLHLanguage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ open class MOLHLanguage {
*/
public class func setDefaultLanguage(_ language: String) {
if !UserDefaults.standard.bool(forKey: MOLHFirstTimeLanguage) {
self.setAppleLAnguageTo(language)
MOLH.setLanguageTo(language)
UserDefaults.standard.set(true, forKey: MOLHFirstTimeLanguage)
}
}
Expand Down

0 comments on commit 9b364f3

Please sign in to comment.