language

package
v0.45.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ChineseISO_Hans = "zh-hans" // 简体
	ChineseISO_Hant = "zh-hant" // 繁體
	ChineseISO_CN   = "zh-cn"   // 大陆简体
	ChineseISO_TW   = "zh-tw"   // 臺灣正體
	ChineseISO_SG   = "zh-sg"   // 新加坡简体/马新简体
	ChineseISO_MY   = "zh-my"   // 大马简体
	ChineseISO_HK   = "zh-hk"   // 香港繁體
	ChineseISO_MO   = "zh-mo"   // 澳門繁體
)

中文语言编码变种 参考 https://en.wikipedia.org/wiki/Chinese_Wikipedia#Automatic_conversion_between_traditional_and_simplified_Chinese_characters

View Source
const (
	ISO_639_1_Chinese  = "zh"
	ISO_639_1_English  = "en"
	ISO_639_1_Korean   = "ko"
	ISO_639_1_Japanese = "ja"
)

参考 https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes 标准

View Source
const (
	ISO_639_2T_Chinese  = "zho"
	ISO_639_2T_English  = "eng"
	ISO_639_2T_Korean   = "kor"
	ISO_639_2T_Japanese = "jpn"
)
View Source
const (
	ISO_639_2B_Chinese  = "chi"
	ISO_639_2B_English  = "eng"
	ISO_639_2B_Korean   = "kor"
	ISO_639_2B_Japanese = "jpn"
)
View Source
const (
	ISO_639_3_Chinese  = "zho"
	ISO_639_3_English  = "eng"
	ISO_639_3_Korean   = "kor"
	ISO_639_3_Japanese = "jpn"
)
View Source
const (
	RegISORuleFront = `(?mi)\.(`
	RegISORuleEnd   = `)(\.\S+)`
)
View Source
const (
	Emby_English_eng = "eng"

	Emby_chinese     = ".chinese" // 中文
	Emby_chinese_chs = "chs"      // Emby 解析出来的 LanguageString chs
	Emby_chinese_cht = "cht"      // Emby 解析出来的 LanguageString cht
	Emby_chinese_chi = "chi"      // Emby 解析出来的 LanguageString chi
)

需要符合 emby_helper 的格式要求,在后缀名前面

View Source
const (
	MathLangChnUnknown = "未知语言"
	MatchLangDouble    = "双语"
	MatchLangChs       = "简"
	MatchLangCht       = "繁"
	MatchLangChsEn     = "简英"
	MatchLangChtEn     = "繁英"
	MatchLangEn        = "英"
	MatchLangJp        = "日"
	MatchLangChsJp     = "简日"
	MatchLangChtJp     = "繁日"
	MatchLangKr        = "韩"
	MatchLangChsKr     = "简韩"
	MatchLangChtKr     = "繁韩"
)
View Source
const (
	Emby_chs    = ".chs"    // 简体
	Emby_cht    = ".cht"    // 繁体
	Emby_chs_en = ".chs_en" // 简英双语字幕
	Emby_cht_en = ".cht_en" // 繁英双语字幕
	Emby_chs_jp = ".chs_jp" // 简日双语字幕
	Emby_cht_jp = ".cht_jp" // 繁日双语字幕
	Emby_chs_kr = ".chs_kr" // 简韩双语字幕
	Emby_cht_kr = ".cht_kr" // 繁韩双语字幕
)

最开始版本使用的名称,现在已经弃用

Variables

This section is empty.

Functions

This section is empty.

Types

type MyLanguage

type MyLanguage int

MyLanguage 语言类型,注意,这里默认还是查找的是中文字幕,只不过下载的时候可能附带了其他的

const (
	Unknown                    MyLanguage = iota // 未知语言
	ChineseSimple                                // 简体中文
	ChineseTraditional                           // 繁体中文
	ChineseSimpleEnglish                         // 简英双语字幕
	ChineseTraditionalEnglish                    // 繁英双语字幕
	English                                      // 英文
	Japanese                                     // 日语
	ChineseSimpleJapanese                        // 简日双语字幕
	ChineseTraditionalJapanese                   // 繁日双语字幕
	Korean                                       // 韩语
	ChineseSimpleKorean                          // 简韩双语字幕
	ChineseTraditionalKorean                     // 繁韩双语字幕
)

func (MyLanguage) String

func (l MyLanguage) String() string

Jump to

Keyboard shortcuts

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