Skip to content

Commit

Permalink
added documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
vijay kumar committed Aug 6, 2016
1 parent 7df6c16 commit e4da2ec
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 8 deletions.
12 changes: 6 additions & 6 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License
The MIT License (MIT)

Copyright (c) 2016 vijay kumar
Copyright (c) 2014 Jeffrey Way <jeffrey@laracasts.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -9,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
41 changes: 39 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,39 @@
# transvel
Laravel Package for automatic translation using Google API
# Transvel
This package allows you to convert all files in `resources/lang/en` folder to required languages automatically. Its easy to configure and run simple command.

### Dependencies
This package uses [Dedicated Google Translate](https://github.com/ddctd143/google-translate/)

## Installation

Package can be installed using composer by adding to "require" object

```
"require": {
"vijaytupakula/transvel": "dev-master"
}
```
now run `composer update`

or from console:
```json
composer require vijaytupakula/transvel dev-master
```

now lets add class loader to `providers` array in `config/app.php` file
```php
Vijaytupakula\Transvel\TransvelServiceProvider::class
```
once the class loader is added, try to run `php artisan list` this should show `php artisan translate` command.

## Configuration
Now add your available langueges in the `config/app.php` as follows
```php
'locales' => ['en' => 'English', 'fr' => 'French', 'it' => 'Italian'],
```

## usage
Run `php artisan translate` : this command fetches all the files from `resources/lang/en` folder and then creates the files in each folders that are added as `locales` in `app/config.php` with translation using google api.

## Contact
Please feel free to contact me if you have problem using it. It works great for me :)

0 comments on commit e4da2ec

Please sign in to comment.