Skip to content

baptistejamin/swift-locales-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

IsoLocales for Swift

Platform Swift Version

Iso Locale codes - that retrieves Locale names using an ISO 639 locale code.

What?

This is a iOS Swift library/class files that does a simple lookup depending on a ISO 693 iso693 locale code.

Usage:

You can search via alpha-1, alpha-2 or alpha-3 format. Searching an ISO code returns a struct.

print(IsoLocaleCodes.find(key: "FR").name) //French
print(IsoLocaleCodes.find(key: "NLD").name) //Dutch
print(IsoLocaleCodes.find(key: "NL").currency) //Dutch

You can also search by locale name

dump(IsoLocaleCodes.searchByName(name: "Dutch")

dump(IsoLocaleCodes.searchByLocal(name: "Français")

This returns a IsoCountryInfo struct:

 IsoLocaleInfo
    - name: Dutch
    - local: Nederlands
    - alpha1: nl,
    - alpha2: nld
    - alpha2T: nld
    - alpha2B: dut
    - alpha3: nld

Usage:

Copy/add files to your project

Credits:

funky-monkey: https://github.com/funky-monkey/IsoCountryCodes Jerryzhao-z: https://github.com/Jerryzhao-z/angular-language-code

About

Finds locale name using an ISO locale code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages