https://github.com/hyperscale-stack/locale
Store locale into Context
https://github.com/hyperscale-stack/locale
context go go-module golang golang-library golang-module locale
Last synced: 23 days ago
JSON representation
Store locale into Context
- Host: GitHub
- URL: https://github.com/hyperscale-stack/locale
- Owner: hyperscale-stack
- License: mit
- Created: 2022-02-24T21:06:24.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-12-15T06:34:29.000Z (about 2 months ago)
- Last Synced: 2025-12-18T03:23:58.637Z (about 2 months ago)
- Topics: context, go, go-module, golang, golang-library, golang-module, locale
- Language: Go
- Homepage:
- Size: 53.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Hyperscale Locale [](https://github.com/hyperscale-stack/locale/releases/latest) [](https://godoc.org/github.com/hyperscale-stack/locale)
[](https://goreportcard.com/report/github.com/hyperscale-stack/locale)
| Branch | Status | Coverage |
| ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| master | [](https://github.com/hyperscale-stack/locale/actions?query=workflow%3AGo) | [](https://coveralls.io/github/hyperscale-stack/locale?branch=master) |
The Hyperscale locale library provides a simple locale manager
## Example
```go
package main
import (
"fmt"
"github.com/hyperscale-stack/locale"
)
func main() {
ctx := context.Background()
ctx = locale.ToContext(ctx, language.French)
tag := locale.FromContext(ctx) // return language.French or locale.DefaultLocale if
}
```
## License
Hyperscale Locale is licensed under [the MIT license](LICENSE.md).