Skip to content

Commit

Permalink
change to public
Browse files Browse the repository at this point in the history
  • Loading branch information
LapStore committed Feb 4, 2019
1 parent a3d03e0 commit fb6224b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
18 changes: 18 additions & 0 deletions LocalizableLib.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

Pod::Spec.new do |s|
s.name = 'LocalizableLib'
s.version = '0.1.6'
s.summary = 'support change language on the fly and Right to left languages and localize views from StoryBoard'
s.description = <<-DESC
support change language on the fly and Right to left languages and localize views from StoryBoard!
DESC

s.homepage = 'https://github.com/sh3at90/Localization'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { '<MOHAMED MAHMOUD>' => '<[email protected]>' }
s.source = { :git => 'https://github.com/sh3at90/Localization.git', :tag => s.version.to_s }

s.ios.deployment_target = '10.0'
s.source_files = 'LocalizableLib/*'

end
10 changes: 5 additions & 5 deletions LocalizableLib/MoLocalization.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

import UIKit

struct Constants {
static let appleLanguage = "AppleLanguages"
static let defaultLanguage = "en"
static let arabicLanguage = "ar"
public struct Constants {
public static let appleLanguage = "AppleLanguages"
public static let defaultLanguage = "en"
public static let arabicLanguage = "ar"
}

public class MoLocalization: NSObject {
Expand Down Expand Up @@ -61,7 +61,7 @@ public class MoLocalization: NSObject {

extension String {

func localized() -> String {
public func localized() -> String {
let path = Bundle.main.path(forResource: MoLocalization.currentAppleLanguage(), ofType: "lproj")
let bundle = Bundle(path: path!)
return NSLocalizedString(self, tableName: nil, bundle: bundle!, value: "", comment: "")
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
using pods

```bash
pod 'LocalizableLib', '~> 0.1.5'
pod 'LocalizableLib', '~> 0.1.6'
```

## Usage
Expand Down

0 comments on commit fb6224b

Please sign in to comment.