Crowdin API in Go
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
README.md
crowdin.go
crowdin_test.go
model.go
test_utils.go
utils.go

README.md

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