A simple setlocale(3) wrapper for Go.
To add this package in your project, run the following:
go get github.com/vsakkas/gosetlocale
This package contains only one function, SetLocale
, which receives two arguments, the locale and the category.
The available locale values can be found in the gosetlocale.go file.
An example usage of this package is the following:
package main
import (
sl "github.com/vsakkas/gosetlocale"
)
func main() {
// Make program portable to all locales.
sl.SetLocale(sl.LcAll, "")
}
To build this project locally, first clone it:
git clone git@github.com:vsakkas/gosetlocale.git
Then, build it using the following command:
go build
It is recommended to use Go 1.15 or newer.
This project is licensed under the MIT License - see the LICENSE file for details.