Improved code

git-svn-id: file:///srv/svn/repo/mai/trunk@20 e410bdd4-646f-c54f-a7ce-fffcc4f439ae
This commit is contained in:
manerakai
2023-08-31 08:28:02 +00:00
parent a550111b23
commit 4b95465cbe
7 changed files with 51 additions and 31 deletions

View File

@@ -12,13 +12,14 @@ type Engine interface {
TargetLanguages() (Language, error)
Translate(text string, from, to string) (TranslationResult, error)
DetectLanguage(text string) (string, error)
Tts(text, lang string) (string, error)
}
type Language map[string]string
var Engines = map[string]Engine{
"google": &GoogleTranslate{},
"icibia": &ICIBA{},
"libre": &LibreTranslate{},
"google": &GoogleTranslate{},
// "icibia": &ICIBA{},
// "libre": &LibreTranslate{},
"reverseo": &Reverso{},
}