localedata

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category struct {
	// contains filtered or unexported fields
}

type Database

type Database struct {
	// contains filtered or unexported fields
}

func LoadDatabase

func LoadDatabase() (*Database, error)

func (*Database) Codes added in v1.1.0

func (d *Database) Codes() []string

Codes returns the list of all locale codes (mostly BCP47 tho includes other special values such as POSIX, i18n etc), sorted alphabetically

func (*Database) Query

func (d *Database) Query(code string, lc LC, keyword string) ([]string, error)

Query returns the operands of the given locale + category + key

func (*Database) QueryInteger

func (d *Database) QueryInteger(code string, lc LC, keyword string) (int, error)

QueryInteger is a helper for keys which are a single integer

func (*Database) QueryString

func (d *Database) QueryString(code string, lc LC, keyword string) (string, error)

QueryString is a helper for keys which are a single string

type LC

type LC string

type Locale

type Locale struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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