Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SimplifiedChinese = Language{ Key: "zh-cn", Name: "简体中文", Short: "简", } TraditionalChinese = Language{ Key: "zh-tw", Name: "繁體中文", Short: "繁", } German = Language{ Key: "de-de", Name: "Deutsch", Short: "DE", } English = Language{ Key: "en-us", Name: "English", Short: "EN", } Spanish = Language{ Key: "es-es", Name: "Español", Short: "ES", } French = Language{ Key: "fr-fr", Name: "Français", Short: "FR", } Indonesian = Language{ Key: "id-id", Name: "Indonesia", Short: "ID", } Japanese = Language{ Key: "ja-jp", Name: "日本語", Short: "JP", } Korean = Language{ Key: "ko-kr", Name: "한국어", Short: "KR", } Portuguese = Language{ Key: "pt-pt", Name: "Português", Short: "PT", } Russian = Language{ Key: "ru-ru", Name: "Pусский", Short: "RU", } Thai = Language{ Key: "th-th", Name: "ภาษาไทย", Short: "TH", } Vietnamese = Language{ Key: "vi-vn", Name: "Tiếng Việt", Short: "VN", } )
View Source
var Languages = []Language{ SimplifiedChinese, TraditionalChinese, German, English, Spanish, French, Indonesian, Japanese, Korean, Portuguese, Russian, Thai, Vietnamese, }
View Source
var Matcher = language.NewMatcher(Supported)
View Source
var Supported = []language.Tag{ language.AmericanEnglish, language.SimplifiedChinese, language.TraditionalChinese, language.German, language.EuropeanSpanish, language.French, language.Indonesian, language.Japanese, language.Korean, language.EuropeanPortuguese, language.Russian, language.Thai, language.Vietnamese, }
Functions ¶
func ReadLocaleFile ¶
Types ¶
type Language ¶
type Language struct { Key string `mapstructure:"key" json:"key"` Name string `mapstructure:"name" json:"name"` Short string `mapstructure:"short" json:"short"` }
func (Language) CanonicalKey ¶
func (Language) ParentVarName ¶
type Locale ¶
type Locale struct { Language Language `json:"language"` Characters map[string]string `json:"characters"` CharactersInverse map[string]string `json:"charactersInverse"` Weapons map[string]string `json:"weapons"` WeaponsInverse map[string]string `json:"weaponsInverse"` Wishes map[string]string `json:"wishes"` }
func ReadLocale ¶
func (Locale) BaseFilename ¶
Click to show internal directories.
Click to hide internal directories.