georgii-web/crowdin-api

A crowdin API implementation in PHP

3.0.1 2021-05-07 14:13 UTC

This package is auto-updated.

Last update: 2024-11-07 22:17:53 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 georgii-web/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

=;)