locale

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT, Unlicense Imports: 4 Imported by: 0

Documentation

Overview

Package locale can be used to get the end-user preferred language, useful for multi-language apps.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotAvailableAPI indicates that the current device/OS doesn't support such function.
	ErrNotAvailableAPI = errors.New("pref: not available api")

	// ErrUnknownLanguage indicates that the current language is not supported by x/text/language.
	ErrUnknownLanguage = errors.New("pref: unknown language")
)

Functions

func Language

func Language() (language.Tag, error)

Language is the preferred language of the end-user or the language of the operating system.

Types

This section is empty.

Jump to

Keyboard shortcuts

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