mirror of
https://github.com/UrbanApps/Armchair.git
synced 2026-03-20 16:44:14 +01:00
Updated examples.
This commit is contained in:
@@ -55,12 +55,12 @@ extension ViewController {
|
||||
|
||||
// Only set it if we are using Armchair localizations
|
||||
if !Armchair.useMainAppBundleForLocalizations() {
|
||||
var currentLocalization: NSString = NSBundle.mainBundle().preferredLocalizations[0] as NSString
|
||||
var currentLocalization: NSString = NSBundle.mainBundle().preferredLocalizations[0] as! NSString
|
||||
// Only set it if we are using a different language than this apps development language
|
||||
if let developmentLocalization = NSBundle.mainBundle().developmentLocalization {
|
||||
if currentLocalization != developmentLocalization {
|
||||
languageLabelText = currentLocalization
|
||||
if let displayName = NSLocale(localeIdentifier: currentLocalization).displayNameForKey(NSLocaleIdentifier, value:currentLocalization) {
|
||||
languageLabelText = currentLocalization as String
|
||||
if let displayName = NSLocale(localeIdentifier: currentLocalization as String).displayNameForKey(NSLocaleIdentifier, value:currentLocalization) {
|
||||
languageLabelText = "\(displayName): \(currentLocalization)"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user