Contents

Develop
2018.11.29 07:47

[ios] Locale Identifiers

조회 수 1748 댓글 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
번호 분류 제목 글쓴이 날짜 조회 수
453 Develop [php] 논문 관리 프로그램.. ㅋㅋ file hooni 2013.04.23 7290
452 Develop [chm] Programming Applications for Microsoft Windows file hooni 2013.04.23 7287
451 Develop [c] 패킷정보출력(경로, 패킷길이, 3hand, sync, ack..) file hooni 2003.04.23 7287
450 Develop [c] 무선 Radius Server 자료.. file hooni 2013.04.23 7284
449 Develop [linux] crond 사용법.. ㅋㅋ hooni 2013.04.23 7279
448 Develop [c++] mfc로 만든 인테리어 수납 시스템(2D기반 설계) file hooni 2013.04.23 7278
447 Develop [c] 단기과정[01/08] 배열, 포인터 hooni 2003.04.23 7269
446 Develop [php] 웹 터미널 & 업로드 소스.. file hooni 2013.04.23 7266
445 Develop [c] 단기과정[01/15] 피보나치, 파스칼.. 링크리스트 file hooni 2003.04.23 7260
444 Develop [html] 메타태그 사용예.. 은지나 바라~ hooni 2003.04.23 7259
443 Develop [c] 단기과정[01/17] 후위연산 스택 계산기.. file hooni 2003.04.23 7255
442 Develop [c] 심심해서.. fseek() 예제.. file hooni 2003.04.23 7254
Board Pagination Prev 1 ... 56 57 58 59 60 61 62 63 64 65 ... 98 Next
/ 98