languageutil

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2026 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeLanguageCode added in v0.3.2

func NormalizeLanguageCode(value string) string

NormalizeLanguageCode resolves a complete language code or English display name to its ISO 639 base code. Blank and unrecognized inputs return empty.

func NormalizeLanguageDisplay

func NormalizeLanguageDisplay(value string) string

NormalizeLanguageDisplay returns the English base-language label resolved from the first code or name token. It preserves stable labels for the ISO special codes mul and zxx; region and trailing tokens are discarded, and blank or unresolved input returns an empty string.

func NormalizeLanguageLabel added in v0.3.2

func NormalizeLanguageLabel(value string) string

NormalizeLanguageLabel resolves a complete language code or English display name to its complete English base-language label. Blank and unrecognized inputs return empty.

func NormalizeLanguageList added in v0.3.2

func NormalizeLanguageList(values []string) []string

NormalizeLanguageList splits comma-separated entries, normalizes recognized labels, preserves unknown nonempty labels, and removes duplicates in order.

Types

This section is empty.

Jump to

Keyboard shortcuts

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