File: README.md

package info (click to toggle)
golang-github-delthas-go-localeinfo 0.0~git20240607.b2e834f-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 92 kB
  • sloc: makefile: 2
file content (30 lines) | stat: -rw-r--r-- 912 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# go-localeinfo [![GoDoc](https://godocs.io/github.com/delthas/go-localeinfo?status.svg)](https://godocs.io/github.com/delthas/go-localeinfo)

A cross-platform library for extracting locale information.

Rather than extracting the current locale name (e.g. en_US), this library enables clients to extract monetary/numeric/time formatting information.

This library is basically a wrapper over different platform-specific calls:
- on Linux: nl_langinfo
- on Windows: GetLocaleInfoEx
- on other platforms: a stub implementation that returns empty values

## Usage

The API is well-documented in its [![GoDoc](https://godocs.io/github.com/delthas/go-localeinfo?status.svg)](https://godocs.io/github.com/delthas/go-localeinfo)

```
l := localeinfo.Default()
fmt.Printf("123%s456\n", l.ThousandSeparator())
```

## Status

Used in small-scale production environments.

- [ ] Add darwin
- [ ] Add web

## License

MIT