Skip to content

MOMMH2008/MHLocalizable

Repository files navigation


MHLocalizable

The Art of Swizzling and Localization

MHLocalizable

MHLocalizable support all RTL and LTR languages , it's a simple and easy framework to improves localization your iOS App quickly, allow you to change language of project in-app without quiting the app by swizzling. it's working on Storyboard itself not string file or any other files.



Requirements

  • iOS 9+
  • Swift 4+

Features

  • Full supported Swizzling so will change on the fly.
  • Working on Storyboard directly.
  • Doesn't use string file or any other files.
  • Support all RTL and LTR languages, auto detecte and change the layout according to Language.
  • Support reload any specific view after localization.
  • Support iOS 9.0+
  • Full documentation.
  • Support full example.

Installation

CocoaPods

Simply add the following to your project Podfile.

pod 'MHLocalizable'

Manual

Simply add the this file MHLocalizable to your project project and it will do every thing.

Usage

AppDelegate

First in AppDelegate

import MHLocalizable

Add in "didFinishLaunchingWithOptions"

//TODO:- DoTheSwizzling
  MHLocalizable.DoTheSwizzling()

ViewController

Add in your ViewController

import MHLocalizable

And in the action of button that will change the Language Add this

if MHLocalizable.currentAppleLanguage() != "fr" {
      MHLocalizable.setAppleLanguageTo(lang: "fr")
      //optional to reload any specific view don't forget change the "Identifier"
      MHLocalizable.reloadRootViewController(ViewControllerIdentifier: "your ViewController Identifier")
    }

Contributing

Thank you Appsinnovate for Support. Thank you moath othman for Inspiration.

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

About

Localizable swizzling StoryBoard

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages