Contents

Develop
2018.11.29 07:47

[ios] Locale Identifiers

조회 수 1740 댓글 0
Atachment
첨부 '1'
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

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

쓸 때는 이렇게.. ㅎㅎㅎ


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
번호 분류 제목 글쓴이 날짜 조회 수
445 Develop [html] SVG(Scalable Vector Graphics) 간단 정리 hooni 2014.02.13 8868
444 Develop [html] 메타태그 사용예.. 은지나 바라~ hooni 2003.04.23 7255
443 Develop [html] 캐쉬된 웹페이지 사용하지 않도록 하는 방법 hooni 2003.04.23 13070
442 Develop [ios] UIView 계층구조 hooni 2015.01.03 1226
441 Develop [ios] @property의 속성 (strong, weak, copy) 사용 경우 hooni 2014.08.08 1777
440 Develop [ios] AES256 알고리즘을 이용해 데이터 암호화/복호화 방법 file hooni 2015.07.21 4192
439 Develop [ios] APNS 샘플 코드.. secret hooni 2013.06.27 0
438 Develop [ios] APNS 클라이언트 구현 (pdf) file hooni 2013.06.27 15835
437 Develop [ios] APNS, Remote Push 사용자가 수신을 동의했는지 확인하기 hooni 2018.10.19 1371
436 Develop [ios] APNS, Remote Push 수신 시점에서 앱의 3가지 실행 상태 hooni 2018.10.19 1093
435 Develop [ios] APNS에 사용할 인증서 만들기 (KeyChain에 있는 인증서 Export) file hooni 2015.01.03 992
434 Develop [ios] App States file hooni 2013.07.22 13254
Board Pagination Prev 1 ... 29 30 31 32 33 34 35 36 37 38 ... 71 Next
/ 71