README ¶ Hyperscale Locale Branch Status Coverage master The Hyperscale locale library provides a simple locale manager Example 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. Expand ▾ Collapse ▴ Documentation ¶ Index ¶ Variables func FromContext(ctx context.Context) language.Tag func ToContext(ctx context.Context, tag language.Tag) context.Context Constants ¶ This section is empty. Variables ¶ View Source var DefaultLocale = language.English Functions ¶ func FromContext ¶ func FromContext(ctx context.Context) language.Tag FromContext returns language.Tag from context.Context. func ToContext ¶ func ToContext(ctx context.Context, tag language.Tag) context.Context ToContext add language.Tag to context.Context. Types ¶ This section is empty. Source Files ¶ View all Source files context.go default.go Click to show internal directories. Click to hide internal directories.