lang_info

package
v0.0.0-...-17244d7 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSupportedLocale

func IsSupportedLocale(locale string) bool

Types

type LangCodeInfo

type LangCodeInfo struct {
	LangCode    string
	CountryCode string
	Variant     string
}

func GetLangCodeInfo

func GetLangCodeInfo(locale string) (*LangCodeInfo, error)

type LangInfo

type LangInfo struct {
	Locale      string `json:"Locale"`
	Description string `json:"Description"`
	LangCode    string `json:"LangCode"`
	CountryCode string `json:"CountryCode"`
}

func (*LangInfo) ToLangCode

func (info *LangInfo) ToLangCode() *LangCodeInfo

type LangInfos

type LangInfos []LangInfo

func GetSupportedLangInfos

func GetSupportedLangInfos() (LangInfos, error)

func (LangInfos) Get

func (infos LangInfos) Get(locale string) (*LangInfo, error)

Jump to

Keyboard shortcuts

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