Skip to content

ayvazyan10/LaravelGoogleTranslator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LaravelGoogleTranslator

Translating texts with google translation service for free but with ip limits (use proxy) Take a look at contributing.md to see a to do list.

Installation

Via Composer

composer require ayvazyan10/laravelgoogletranslator

Usage

Publish provider for config file

php artisan vendor:publish --provider="Ayvazyan10\LaravelGoogleTranslator\LaravelGoogleTranslatorServiceProvider"

2 ways calling

use Ayvazyan10\LaravelGoogleTranslator\LaravelGoogleTranslator;

$trans = new LaravelGoogleTranslator();

$trans->trans('ru', 'en', 'Собака'); // result "Dog"

or with global function

google()->trans('es', 'en', 'buenos días'); // result "good morning"

if you want use proxy see config/laravelgoogletranslator.php config file

<?php

return [
    'proxy' => null, // example: ip:port
];

Change log

Please see the changelog for more information on what has changed recently.

Testing

composer test

Contributing

Please see contributing.md for details and a todolist.

Security

If you discover any security related issues, please email ayvazyan403@gmail.com instead of using the issue tracker.

Credits

License

MIT. Please see the license file for more information.

About

Translating texts with google translation service

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages