Coder Social home page Coder Social logo

pmsabertlili / switchlanguage Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nicolaspoincet/switchlanguage

0.0 0.0 0.0 79 KB

Switch Language help you to easily translate your iOS or tvOS app

License: MIT License

Ruby 25.07% Objective-C 1.49% Swift 73.44%

switchlanguage's Introduction

Switch Language

Travis CI Swift Version SwitchLanguage version SwitchLanguage Platform Readme Score codecov License: MIT

Switch Language help you to easily translate your iOS app.

CocoaPods Setup

pod 'SwitchLanguage, '~> 1.0'

Usage

First, you must import Language on each Swift file that will contain text to translate.

import SwitchLanguage

Then, you can add .localized() after any String object you want to translate.

textLabel.text = "Hello".localized()

Next, add the String key in each Localizable.string file with its translation.

"Hello" = "Bonjour";

Enjoy ! :)

Features

To set the table name:

Language.setTableName("TranslationFile")

To get the table name:

Language.getTableName()

To get all available languages:

Language.getAllLanguages()

To reset language to default:

Language.resetCurrentLanguageToDefault()

To set current language:

Language.setCurrentLanguage("fr")

To get current language:

Language.getCurrentLanguage()

To get default language:

Language.getDefaultLanguage()

UI

alt text

Authors

  • Bérangère LA TOUCHE
  • Hoang-Nam NGUYEN
  • Nicolas POINCET

License

This project is licensed under the MIT License - see the LICENSE file for details

switchlanguage's People

Contributors

nicolaspoincet avatar morty9 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.