2017 © Pedro Peláez
 

symfony-bundle lokalise-bundle

A Symfony Lokalise translation bundle

image

alicorn/lokalise-bundle

A Symfony Lokalise translation bundle

  • Friday, July 13, 2018
  • by beinarovic
  • Repository
  • 1 Watchers
  • 0 Stars
  • 49 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 6 Versions
  • 17 % Grown

The README.md

Symfony webhook bundle for Lokalise

This bundle receives the webhook from lokalise.co and uploads the new translation files to your directories., (*1)

1. Installing the bundle

Require it with composer., (*2)

composer require alicorn/lokalise-bundle

2. Enable the bundle in your kernel

// app/AppKernel.php

public function registerBundles()
{
    return array(
        // ...
        new Alicorn\LokaliseBundle\AlicornLokaliseBundle(),
        // ...
    );
}

3. Configure the bundle routing

# app/config/routing.yml

# Webhook url configuration
alicorn_lokalise:
    resource: "@AlicornLokaliseBundle/Controller/"
    type:     annotation
    prefix:   /lokalise/webhook/ # your webhook url

4. Configure the bundle

# app/config/config.yml

# ...

alicorn_lokalise:
    # Webhook configuration
    host: "https://s3-eu-west-1.amazonaws.com/lokalise-assets/" # Lokalise host for downloads can be overwritten
    web_path: "web/locales" # Path for locale files #1
    symfony_path: "app/Resources/translations" # Path for locale files #2, can be blank
    extract_file: "/tmp/langs.zip"

    # API configuration
    api:
        api_token: "XXXXXXXXXXXXXXXXXXXXXX"
        project_id: "XXXXXXXXXXXXXXXXXXXXXX"
        type: "json"
        use_original: "0"
        bundle_structure: "%%LANG_ISO%%.%%FORMAT%%"
        base_url: "https://lokalise.co/api/"
        directory_prefix: "%%LANG_ISO%%"

5. Configure webhook on lokalise

Configure your webhook on lokalise., (*3)

screen shot 2017-05-03 at 16 43 42, (*4)

When building the project in lokalise, it will trigger the webhook and unzip the translation files to the configured directories., (*5)

6. Download translations via cli

If the API is configured, you can use the import command to update all translation files locally., (*6)

php bin/console lokalise:import

The Versions

13/07 2018

dev-master

9999999-dev

A Symfony Lokalise translation bundle

  Sources   Download

MIT

The Requires

  • ext-zip *
  • ext-curl *

 

by Avatar beinarovic

symfony lokalise translation bundle

13/07 2018

v0.1.4

0.1.4.0

A Symfony Lokalise translation bundle

  Sources   Download

MIT

The Requires

  • ext-zip *
  • ext-curl *

 

by Avatar beinarovic

symfony lokalise translation bundle

08/05 2017

v0.1.3

0.1.3.0

A Symfony Lokalise translation bundle

  Sources   Download

MIT

The Requires

  • ext-zip *
  • ext-curl *

 

by Avatar beinarovic

symfony lokalise translation bundle

08/05 2017

v0.1.2

0.1.2.0

A Symfony Lokalise translation bundle

  Sources   Download

MIT

The Requires

  • ext-zip *
  • ext-curl *

 

by Avatar beinarovic

symfony lokalise translation bundle

03/05 2017

v0.1.1

0.1.1.0

A Symfony Lokalise translation bundle

  Sources   Download

MIT

The Requires

  • ext-zip *
  • ext-curl *

 

by Avatar beinarovic

symfony lokalise translation bundle

03/05 2017

v0.1.0

0.1.0.0

A Symfony Lokalise translation bundle

  Sources   Download

MIT

The Requires

  • ext-zip *
  • ext-curl *

 

by Avatar beinarovic

symfony lokalise translation bundle