Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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 main

import (
"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 ./...
```