8000 GitHub - mohan12311/deepL-GO: deepL API for Go
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000

mohan12311/deepL-GO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

deepL-GO

Go Version License

deepL-GO는 DeepL API를 사용하여 번역 기능을 제공하는 Go 언어 라이브러리입니다.

소개

deepL-GO는 DeepL의 번역 기능을 간편하게 사용할 수 있도록 도와주는 라이브러리입니다. 이 라이브러리를 사용하면 다양한 언어의 텍스트를 간단하게 번역할 수 있습니다.

설치

Go Modules를 사용하여 간편하게 설치할 수 있습니다.

go get github.com/mohan12311/deepL-GO

사용방법

아래는 deepL-GO 라이브러리를 사용하는 간단한 예제입니다.

package main

import (
    "fmt"
    "log"

    "github.com/mohan12311/deepL-GO/deepl"
)

func main() {
    apiKey := "YOUR_DEEPL_API_KEY"
    client := deepl.NewClient(apiKey)
    translationRequest := deepl.NewTranslationRequest(
		[]string{"Hello world"},
		"DE",
		// optional choice
		deepl.WithSourceLang("EN"),
		deepl.WithFormality("more"),
    )
	
    translatedText, err := client.Translate(translationRequest)
    if err != nil {
        log.Fatalf("Failed to translate text: %v", err)
    }

    fmt.Println("Translated Text:", translatedText)
}

About

deepL API for Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0