Documentation ¶
Index ¶
Constants ¶
const ( LanguageTypeIndividual LanguageScope = 'I' LanguageTypeSpecial LanguageScope = 'S' LanguageTypeMacrolanguage LanguageScope = 'M' LanguageScopeLiving LanguageType = 'L' LanguageScopeHistorical LanguageType = 'H' LanguageScopeAncient LanguageType = 'A' LanguageScopeExtinct LanguageType = 'E' LanguageScopeConstructed LanguageType = 'C' LanguageScopeSpecial LanguageType = 'S' )
Variables ¶
var LanguagesPart1 = map[string]Language{}/* 184 elements not displayed */
LanguagesPart1 lookup table. Keys are ISO 639-1 codes
var LanguagesPart2 = map[string]Language{}/* 440 elements not displayed */
LanguagesPart2 lookup table. Keys are ISO 639-2 codes
var LanguagesPart3 = map[string]Language{}/* 7893 elements not displayed */
LanguagesPart3 lookup table. Keys are ISO 639-3 codes
Functions ¶
This section is empty.
Types ¶
type Language ¶
type Language struct { Part3 string // ISO639-3 code Part2B string // ISO639-2 bibliographic code Part2T string // ISO639-2 terminology code Part1 string // ISO639-1 code Scope LanguageScope LanguageType LanguageType Name string Comment string }
Language holds language info - all ISO 639 codes along with name and some additional info
func FromAnyCode ¶
FromAnyCode looks up language for given code. For three-symbol codes it tries ISO639-3 first, then ISO639-2. For two-symbol codes it tries ISO639-1. Returns nil if not found
func FromPart1Code ¶
FromPart1Code looks up language for given ISO639-1 two-symbol code. Returns nil if not found
func FromPart2Code ¶
FromPart2Code looks up language for given ISO639-2 (both bibliographic or terminology) three-symbol code. Returns nil if not found
func FromPart3Code ¶
FromPart3Code looks up language for given ISO639-3 three-symbol code. Returns nil if not found
type LanguageScope ¶
type LanguageScope rune
LanguageScope represents language scope as defined in ISO 639-3
type LanguageType ¶
type LanguageType rune
LanguageType represents language scope as defined in ISO 639-3