Contents

Develop
2018.11.29 07:47

[ios] Locale Identifiers

Views 1721 Comment 0
Atachment
Attachment '1'
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print

첨부파일에 로케일 정보가 들어있고..

쓸 때는 이렇게.. ㅎㅎㅎ


import UIKit


print("localeIdentifier, Description")


let identifiers: NSArray = NSLocale.availableLocaleIdentifiers as NSArray

let locale = NSLocale(localeIdentifier: "en_US")


identifiers.forEach {

    let name = locale.displayName(forKey: NSLocale.Key.identifier, value: $0)!

    print("\($0),\"\(name)\"")

}



let identifiers : NSArray = NSLocale.availableLocaleIdentifiers()

let locale = NSLocale(localeIdentifier: "en_US")

var list = NSMutableString()


for identifier in identifiers {

    let name = locale.displayNameForKey(NSLocaleIdentifier, value: identifier)!

    list.appendString("\(identifier)\t\(name)\n")

    

}

print(list)


?

List of Articles
No. Category Subject Author Date Views
669 Develop [ios] iOS에서 디바이스 종류 알아오기 hooni 2014.05.24 3739
668 Develop [ios] iphone SetDeviceOrientation 화면 강제 회전 hooni 2013.11.20 18501
667 Develop [ios] libxml/tree.h file not found file hooni 2013.08.08 18763
» Develop [ios] Locale Identifiers file hooni 2018.11.29 1721
665 Develop [ios] NavigationController 에서 왼쪽(back) 버튼 후킹하기 hooni 2015.10.23 1287
664 Develop [ios] None IB vs. StoryBoard 샘플 소스 file hooni 2013.09.06 16991
663 Develop [ios] NSData to NSString (NSString to NSData) hooni 2015.07.21 719
662 Develop [ios] NSData 클래스에 대해 (NSData <-> char*) hooni 2013.04.23 26590
661 Develop [ios] NSMutableString 문자열 패턴 교환 hooni 2013.04.23 29020
660 Develop [ios] NSNotificationCenter 초간단 사용 예~ ㅋㄷ hooni 2015.06.26 750
659 Develop [ios] NSString URL Encode/Decode (인코딩/디코딩) hooni 2014.05.02 3475
658 Develop [ios] NSString 간단한 정규식 사용법 hooni 2014.01.28 18263
Board Pagination Prev 1 ... 38 39 40 41 42 43 44 45 46 47 ... 98 Next
/ 98