Contents

Develop
2018.11.29 07:47

[ios] Locale Identifiers

조회 수 3323 댓글 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
번호 분류 제목 글쓴이 날짜 조회 수
1141 Develop [php] 3 Ways to Detect Mobile or Desktop in PHP file hooni 2020.01.28 6854
1140 Develop 자주 쓰는 Docker 명령어 alias hooni 2020.01.10 286926
1139 Develop [python][django] request.cookie 읽어오기 ㅋㅋㅋ (쓰기) hooni 2019.12.06 3260
1138 System/OS SSH Passwordless Login Using SSH Keygen in 5 Easy Steps file hooni 2019.11.22 3461
1137 System/OS [virtualbox] VirtualBox에 Ubuntu 설치하기 file hooni 2019.11.22 2231
1136 Database [mysql] MySQL 데이터베이스 추가 및 사용자 추가 hooni 2019.11.22 2294
1135 Database [oracle] Oracle 사용자 추가 절차 hooni 2019.11.22 1916
1134 Database [mysql] MySQL 백업 및 복구 hooni 2019.11.22 2121
1133 Database [mysql] MySql DB/테이블 사이즈 확인을 위한 쿼리 hooni 2019.11.22 1866
1132 Database SQL JOIN 정리 (Inner Join & Outer Join) file hooni 2019.11.22 3158
1131 Develop [python] 파라미터 앞에 *, ** 의 의미? (*args, **kwargs) hooni 2019.11.22 3374
1130 Develop 링크들 보고 지울 내용 secret hooni 2019.11.21 0
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 99 Next
/ 99