locale

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefault

func GetDefault() string

GetDefault get system default language in the form of: ll or ll_CC, where 'll' an ISO 639 two-letter language code (lowercase) and ‘CC’ is an ISO 3166 two-letter country code (uppercase) https://www.gnu.org/software/gettext/manual/html_node/Header-Entry.html 获取系统默认语言,返回格式是 ll 或 ll_CC,其中 ll 是小写语言二字码,CC 是大写地区二字码

func Normalize

func Normalize(lang string) string

Normalize return ll_CC code

func NormalizeTag

func NormalizeTag(tag language.Tag) string

NormalizeTag return ll_CC code

Types

This section is empty.

Jump to

Keyboard shortcuts

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