2017 © Pedro Peláez
 

library google-spreadsheet-exporter

Laravel Artisan Command to generate Laravel Languages files from a Google Spreadsheet

image

airain/google-spreadsheet-exporter

Laravel Artisan Command to generate Laravel Languages files from a Google Spreadsheet

  • Friday, May 15, 2015
  • by airain
  • Repository
  • 2 Watchers
  • 1 Stars
  • 9 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

Introduction

A Laravel (4.1 and above) package in an artisan command, which generates Laravel Languages files from a Google Spreadsheet., (*1)

It will, (*2)

  • read data from a spreadsheet formatted like this
  • outputs as Laravel Lang files like these

This library serves to simply interface with the Laravel framework. The bulk of the actual work is being done by key dependecies., (*3)

Requirements

  • Laravel >4.1
  • PHP >5.4
  • Composer Dependencies
  • A readable Google Spreadsheet
    • The Spreadsheet MUST be the new format (aka Google Sheets) to be compatible
    • Must be shared with the client email (further details on how to generate one below)

Background

The aim is to, (*4)

  • Avoid hard coding copy text
  • Reduce the dev cycle required when doing edits to copy text
  • Nicely handle multiple translations of a copy text

Further background can be found under the Google Spreadsheet Exporter. Especially read up on setting up your Google API client credentials., (*5)

Todo

  • Finalize codebase via usage on a Laravel Application
  • Documentaion
    • How to setup Google API credentials
    • Usage
    • Contributing
  • PhpUnit Tests

Installation

Installation is primary via composer., (*6)

Create a composer.json file in your project and add the following:, (*7)

{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/asimlqt/php-google-spreadsheet-client"
        },
        {
            "type": "vcs",
            "url": "https://github.com/mechastorm/google-spreadsheet-exporter"
        }
    ],
    "require": {
        "mechastorm/laravel-lang-google-spreadsheet-importer": "1.*"
    }
}

1. Add to service provider

Once you have the package installed you'll need to add it to your providers in app/config/app.php, (*8)

Example, (*9)


'providers' => array( 'Mechastorm\LaravelLangGoogleSpreadsheetImporter\LaravelLangGoogleSpreadsheetImporterServiceProvider', ),

Then confirm the artisan command exist by running php artisan list and check if there is a command for google-spreadsheet:generate-lang in the output., (*10)

2. Publish Configuration and Configure

It's recommended that you publish the packages configuration., (*11)

php artisan config:publish mechastorm/laravel-lang-google-spreadsheet-importer

You should open app/config/packages/mechastorm/laravel-lang-google-spreadsheet-importer/config.php and add in details on your spreadsheet and google api access. For details on what/how to add these configs, go to this main readme for more info especially on getting Google API credentials., (*12)

It is strong recommended to do separate configurations per environment., (*13)

Usage

Assuming you have already installed and configured it correctly, you can just run the artisan command to generate the language files, (*14)


php artisan google-spreadsheet:generate-lang

or with enviroment, (*15)


php artisan google-spreadsheet:generate-lang --env={env_name}

Tests

Coming Soon!, (*16)

Contributors

  • Shih Oon Liong (@mechastorm)

License

Released under the Apache 2.0 license., (*17)

The Versions

15/05 2015

dev-develop

dev-develop https://github.com/airain/google-spreadsheet-exporter

Laravel Artisan Command to generate Laravel Languages files from a Google Spreadsheet

  Sources   Download

Apache-2.0

The Requires

 

by Shih Oon Liong

laravel google artisan localization spreadsheet

15/05 2015

dev-release/1.0.2

dev-release/1.0.2 https://github.com/airain/google-spreadsheet-exporter

Laravel Artisan Command to generate Laravel Languages files from a Google Spreadsheet

  Sources   Download

Apache-2.0

The Requires

 

by Shih Oon Liong

laravel google artisan localization spreadsheet

15/05 2015

1.0.2

1.0.2.0 https://github.com/airain/google-spreadsheet-exporter

Laravel Artisan Command to generate Laravel Languages files from a Google Spreadsheet

  Sources   Download

Apache-2.0

The Requires

 

by Shih Oon Liong

laravel google artisan localization spreadsheet

14/05 2015

dev-master

9999999-dev https://github.com/airain/google-spreadsheet-exporter

Laravel Artisan Command to generate Laravel Languages files from a Google Spreadsheet

  Sources   Download

Apache-2.0

The Requires

 

by Shih Oon Liong

laravel google artisan localization spreadsheet

26/06 2014

1.0.1

1.0.1.0 https://github.com/mechastorm/laravel-lang-google-spreadsheet-importer

Laravel Artisan Command to generate Laravel Languages files from a Google Spreadsheet

  Sources   Download

Apache-2.0

The Requires

 

by Shih Oon Liong

laravel google artisan localization spreadsheet

26/06 2014

1.0.0

1.0.0.0 https://github.com/mechastorm/laravel-lang-google-spreadsheet-importer

Laravel Artisan Command to generate Laravel Languages files from a Google Spreadsheet

  Sources   Download

Apache-2.0

The Requires

 

by Shih Oon Liong

laravel google artisan localization spreadsheet