To run the example project, clone the repo, and run pod install
from the Example directory first.
BurmaNRC is written in Swift 5.0+. Compatible with iOS 9.3+.
BurmaNRC is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'BurmaNRC'
Need to use extractNRC()
after BurmaNRC is initialized.
Get translation localize give nrc language format
burmaNRC = BurmaNRC("12/LaThaNa(N)093213")
do {
try burmaNRC.extractNRC()
burmaNRC.translate() // ၁၂/လသန(နိုင်)၀၉၃၂၁၃
}catch {
let err = error as! BurmaNRCError
print(err.localizedDescription)
}
Get locale returns given NRC language in Locale
burmaNRC = BurmaNRC("၁၂/လသန(နိုင်)၀၉၃၂၁၃")
do {
try burmaNRC.extractNRC()
burmaNRC.getLocale() // .mm
}catch {
let err = error as! BurmaNRCError
print(err.localizedDescription)
}
getState()
getDistrict()
getCitizen()
getNumber()
return with current Nrc language format
burmaNRC = BurmaNRC("12/LaThaNa(N)093213")
// 12/LaThaNa(NAING)093213
// 12/LATHANA(Naing)093213
do {
try burmaNRC.extractNRC()
burmaNRC.getState() // Yangon
burmaNRC.getState(.en) // Yangon
burmaNRC.getState(.mm) // ရန်ကုန်တိုင်း
burmaNRC.getDistrict() // LaThaNa // LATHANA
burmaNRC.getDistrict(.en) // LaThaNa
burmaNRC.getDistrict(.mm) // လသန
burmaNRC.getCitizen() // N // NAING
burmaNRC.getCitizen(.en) // N
burmaNRC.getCitizen(.mm) // နိုင်
burmaNRC.getNumber() // 093213
burmaNRC.getNumber(.en) // 093213
burmaNRC.getNumber(.mm) // ၀၉၃၂၁၃
}catch {
let err = error as! BurmaNRCError
print(err.localizedDescription)
}
BurmaNRC is available under the MIT license. See the LICENSE file for more info.