lang

package
v0.149.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package lang is AuthKit's one language normalizer and the request language the HTTP layer hands the engine.

Index

Constants

View Source
const Default = "en"

Default is the language of a message when nothing else chooses one.

Variables

This section is empty.

Functions

func Normalize

func Normalize(tag string) string

Normalize returns tag's two-letter lowercase language ("en-US" and "EN_us" give "en"), or "" when tag names none.

func Request

func Request(ctx context.Context) string

Request is the language WithRequest attached, "" when none.

func WithRequest

func WithRequest(ctx context.Context, language string) context.Context

WithRequest attaches the request's negotiated language to ctx.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL