Latest 0.1.1.beta.1
Homepage https://github.com/eldesoky/EasyLocalization
License MIT
Platforms ios 9.0
Authors

CI Status
Version
License
Platform

Example

To run the example project, clone the repo, and run pod repo update then run pod install from the Example directory first.

Requirements

  • xcode 9.x
  • swift 3.x
  • swift 4.0

Installation

EasyLocalization is available through CocoaPods. To install
it, simply add the following line to your Podfile:

    pod 'EasyLocalization'

Usage

now rtl direction is supported

Make dictionary for every language with

var arabicDic = [
    "test navigation title":"تجربة عنوان",
    "test button":"تجربة زر",
    "test label":"تجربة نص",
    "test textfield":"تجربة حقل نصي",
    "lorem" : "لوريم إيبسوم هو ببساطة نص شكلي بمعنى أن الغاية هي الشكل وليس المحتوى ويُستخدم في صناعات المطابع ودور النشر"
]

var englishDic = [
    "test navigation title":"test navigation title",
    "test button":"test button",
    "test label":"test label",
    "test textfield":"test textfield",
    "lorem" : "Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
]

In AppDelegate.swift, just import EasyLocalization framework and make configration.


EasyLocalization.config(
                        locale: .en,
                        languageDictionary: [
                            .ar : /* set your arbic dictionary for example "arabicDic" */,
                            .en : /* set your english dictionary for example "englishDic" */,
                        ]
                    )

Change your language

EasyLocalization.setLanguage(.ar)

Get your language

EasyLocalization.getLanguage()

usage in controllers

title = "test navigation title".locale

usage in storyboard

UIButton title

alt text

UILabel text

alt text

textfield placeholder

alt text

textview text

alt text

UINavigationItem title

alt text

list of languages keys

[
    .en,
    .fr,
    .de,
    .zhHans,
    .zhHant,
    .ja,
    .es,
    .es419,
    .it,
    .nl,
    .ko,
    .ptBR,
    .ptPT,
    .da,
    .fi,
    .nb,
    .sv,
    .ru,
    .pl,
    .tr,
    .ar,
    .th,
    .cs,
    .hu,
    .ca,
    .hr,
    .el,
    .he,
    .ro,
    .sk,
    .uk,
    .id,
    .ms,
    .vi,
    .hi
]

Author

abdelrahman eldesoky, [email protected]

License

EasyLocalization is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "EasyLocalization",
    "version": "0.1.1.beta.1",
    "summary": "make multi language application easily without restart your app.",
    "description": "EasyLocalization is library for make your application be multi language easily without restart your app",
    "homepage": "https://github.com/eldesoky/EasyLocalization",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "abdelrahman eldesoky": "[email protected]"
    },
    "source": {
        "git": "https://github.com/eldesoky/EasyLocalization.git",
        "tag": "0.1.1.beta.1"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "EasyLocalization/Classes/**/*"
}

Pin It on Pinterest

Share This