GithubHelp home page GithubHelp logo

burmanrc's Introduction

1. BurmaNRC

CI Status Version License Platform

1.1. Example

To run the example project, clone the repo, and run pod install from the Example directory first.

1.2. Requirements

BurmaNRC is written in Swift 5.0+. Compatible with iOS 9.3+.

1.3. Installation

BurmaNRC is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'BurmaNRC'

1.4. Usage

Initializate NRC

Need to use extractNRC() after BurmaNRC is initialized.

Get Translation

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

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)
}

Get State, District, Citizen & Number

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)
}

1.5. Author

[email protected]

1.6. License

BurmaNRC is available under the MIT license. See the LICENSE file for more info.

burmanrc's People

Stargazers

Roman avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.