occ

package
v1.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg Config) map[string]ConvertMap

Types

type Config

type Config struct {
	S2t_Enabled   bool
	T2s_Enabled   bool
	S2tw_Enabled  bool
	Tw2s_Enabled  bool
	S2hk_Enabled  bool
	Hk2s_Enabled  bool
	S2twp_Enabled bool
	Tw2sp_Enabled bool
}

type ConvertMap added in v0.2.1

type ConvertMap struct {
	Cc       *opencc.OpenCC
	Subtitle string
	Icon     string
	Name     Language
	Enabled  bool
	Order    int
}

type Converter

type Converter interface {
	Convert(string) (string, error)
}

type Language

type Language string
const (
	S2t   Language = "s2t"
	T2s   Language = "t2s"
	S2tw  Language = "s2tw"
	Tw2s  Language = "tw2s"
	S2hk  Language = "s2hk"
	Hk2s  Language = "hk2s"
	S2twp Language = "s2twp"
	Tw2sp Language = "tw2sp"
)

Jump to

Keyboard shortcuts

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