lang

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lang

type Lang int

Lang represents a specific language using an internal integer enumeration.

const (
	Arabic Lang = iota
	Bulgarian
	Chinese
	Croatian
	Czech
	Danish
	Dutch
	English
	Estonian
	Finnish
	French
	Greek
	German
	Hebrew
	Hungarian
	Icelandic
	Indonesian
	Irish
	Italian
	Japanese
	Korean
	Latvian
	Lithuanian
	Macedonian
	Malay
	Maltese
	Norwegian
	Persian
	Polish
	Portuguese
	Romanian
	Russian
	Serbian
	Slovak
	Slovenian
	Spanish
	Swahili
	Swedish
	Tagalog
	Thai
	Turkish
	Ukrainian
	Urdu
	Vietnamese
	Welsh
	Yiddish
)

func (Lang) Code

func (l Lang) Code() string

Code returns the corresponding ISO 639-1 string for the Lang value. If the language is unrecognized, it defaults to "en" (English).

type Language

type Language interface {

	// Code returns the ISO 639-1 two-letter language code (e.g., "en", "es").
	Code() string
	// contains filtered or unexported methods
}

Language defines the interface for language types supported by the EPUB standard. It uses a marker method to ensure only valid internal types are used.

Jump to

Keyboard shortcuts

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