Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/noamt/go-cldr
A Go implementation of CLDR
https://github.com/noamt/go-cldr
cldr go locale unicode
Last synced: 16 days ago
JSON representation
A Go implementation of CLDR
- Host: GitHub
- URL: https://github.com/noamt/go-cldr
- Owner: noamt
- Created: 2020-06-02T11:36:17.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-02-28T16:11:03.000Z (almost 2 years ago)
- Last Synced: 2023-07-27T22:24:48.524Z (over 1 year ago)
- Topics: cldr, go, locale, unicode
- Language: Go
- Size: 10.7 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.asciidoc
Awesome Lists containing this project
README
= GO-CLDR
image:https://circleci.com/gh/noamt/go-cldr.svg?style=svg["CircleCI", link="https://circleci.com/gh/noamt/go-cldr"]
A (still partial) implementation of Unicode's CLDR in Go
== Examples
=== Supplemental
==== First Day
Get the first day of the week for a given region.
```
package mainimport (
"github.com/noamt/go-cldr/supplemental"
"golang.org/x/text/language"
)func main() {
tag, _ := language.Parse("en-US")
region, _ := tag.Region()
weekDay := supplemental.FirstDay.ByRegion(region)
println("First day is", weekDay)
}
```== Building
```
$ go generate
$ go test -cover ./...
```