elkuku/crowdin-api

A crowdin API implementation in PHP

2.0 2017-07-01 14:19 UTC

This package is not auto-updated.

Last update: 2020-09-16 06:59:41 UTC


README

Build Status Scrutinizer Code Quality Code Coverage Report SensioLabsInsight Latest Stable Version WTFPL

Inspired by https://github.com/akeneo/php-crowdin-api

Installation

composer require elkuku/crowdin-api

Usage

use ElKuKu\Crowdin\Crowdin;
use ElKuKu\Crowdin\Languagefile;

$crowdin = new Crowdin('{project-id}', '{api-key}');

// Add new translation file
$crowdin->file->add(new Languagefile('{local path}', '{crowdin path}'));

// Export a translated file
$crowdin->file->export('{crowdin path}', '{language}', '{local path}');

// Delete a translation file
$crowdin->file->delete('{crowdin path}');

// Export (build) translation files on Crowdin
$crowdin->translation->export();

// Download a zip file containing all language files
$crowdin->translation->download('all.zip', '/local/path/to/package.zip');

Note: There is fluent auto complete and lots of doc blocks, taken from the official API documentation.

... to make life easy in your IDE 😉

Auto complete

Documentation

Methods

API Documentation

Project

Directory

File

Translation

Language

Memory

Glossary

hF

=;)