SMSLocalization icon indicating copy to clipboard operation
SMSLocalization copied to clipboard

Provide easy way to change Localization inside application.

SMSLocalization:

Note: This is just a helper class written in SWIFT3 that lets you integrate multi language support in your app within few minutes.

How to use

1.Drag LanguageManager file to your project.

2.Create a new file of type string from File -> New -> Resources -> Strings file (name it exactly Localizable.string)

The tile Localizable.string will be holding all the translation of your app as key value pairs.

3.Go to your project Info section and add the language under the Localization tab. screen shot 2016-11-21 at 3 10 36 pm

4.Localize your strings file by selecting the strings file and selecting Localize button under inspector.

screen shot 2016-11-21 at 3 04 05 pm

A pop up appears..Just choose all languages you have set.

screen shot 2016-11-21 at 6 13 27 pm

screen shot 2016-11-21 at 6 14 43 pm

You need to see the files generated for the set localizations.

This way you will generate files with extension "lproj".

screen shot 2016-11-21 at 5 55 28 pm

This all steps are to help you get strings from bundle using following method provided by Xcode: NSLocalizedString("key", bundle: bundle, comment: "To help translator")

5.There is no step 5.You are all done.

Features

  • Sets Language Intially according to the Language Settings of iphone/Simulator. If Language set in simulator is in Finnish, app displays in finnish.But If You localized your App only in Finnish and English but set the Region to Germany default Localization will be in English.

  • Persistence even if the app is closed.