Skip to content

Melsoft-Games/go-crowdin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-crowdin

Crowdin API in Go - https://crowdin.com/page/api

Go Report Card Documentation

Install

go get github.com/medisafe/go-crowdin

Initialize
api := crowdin.New("token", "project-name")
API

📘 Check the doc - Documentation

Examples:

// get language status
files, err := api.GetLanguageStatus("ru")

// add file
result, err := api.AddFile(&crowdin.AddFileOptions{
    Type: "csv",
    Scheme: "identifier,source_or_translation,context",
    FirstLineContainsHeader: true,
    Files: map[string]string{
        "strings_profile_section.csv" : "local/path/to/strings_profile_section.csv",
    },
})
Debug

You can print the internal errors by enabling debug to true

api.SetDebug(true, nil)

You can also define your own io.Writer in case you want to persist the logs somewhere. For example keeping the errors on file

logFile, err := os.Create("crowdin.log")
api.SetDebug(true, logFile)
App Engine

Initialize app engine client and continue as usual

c := appengine.NewContext(r)
client := urlfetch.Client(c)

api := crowdin.New("token", "project-name")
api.SetClient(client)

Documentation

Author

Roman Kushnarenko - sromku

License

Apache License 2.0

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%