Skip to content

Instantly share code, notes, and snippets.

@marmelroy
Created February 7, 2016 21:25
Show Gist options
  • Save marmelroy/4bff81d36645491b9d29 to your computer and use it in GitHub Desktop.
Save marmelroy/4bff81d36645491b9d29 to your computer and use it in GitHub Desktop.
override func viewDidLoad() {
super.viewDidLoad()
setText()
NSNotificationCenter.defaultCenter().addObserver(self, selector: "setText", name: LCLLanguageChangeNotification, object: nil)
}
@IBAction func IndexChanged(sender: UISegmentedControl) {
let language: String
switch self.LangChoser.selectedSegmentIndex
{
case 0: language = "de"
case 1: language = "fr"
default:
break;
}
Localize.setCurrentLanguage(language)
}
func setText () {
CCountry.text = "Country".localized()
}
@YHSX88
Copy link

YHSX88 commented Feb 8, 2016

Everything is working i've added Localizable.strings .

Thank you very much !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment