lang

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package lang provides definitions to specify translation language for template selection and output rendering.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Default language (hard to get around)
	Default = "eng" // ISO639-3
)

Functions

This section is empty.

Types

type Language

type Language struct {
	Code string
	Name string
}

Language is used to set and get language translation to be used for rendering output.

func LanguageFromCode

func LanguageFromCode(code string) (Language, error)

LanguageFromCode returns a Language object from the given ISO-639-3 (three-letter) code.

Will fail if an unknown code is provided.

func (Language) String

func (l Language) String() string

String implements the String interface.

Returns a representation of the Language fit for debugging.

Jump to

Keyboard shortcuts

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