Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Stichoza committed Oct 17, 2014
1 parent c0eaf25 commit 57b57a0
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,35 @@ Google Translate API free PHP class. Translates totally free of charge.

## Installation

Installing this package through [Composer](https://getcomposer.org/). Edit your project's `composer.json` file to require `stichoza/google-translate-php`.
**New!** Now available via [Composer](https://getcomposer.org/) :sunglasses:

Install this package through [Composer](https://getcomposer.org/). Edit your project's `composer.json` file to require `stichoza/google-translate-php`.

```json
"require": {
"stichoza/google-translate-php": "~2.0"
}
```

**Or** run a command in your command line:

```
composer require stichoza/google-translate-php
```

## Usage

Instantiate GoogleTranslate object
```php
$tr = new GoogleTranslate("en", "ka");
```
or set/change languages later
Rr set/change languages later
```php
$tr = new GoogleTranslate();
$tr->setLangFrom("en");
$tr->setLangTo("ka");
```
translate sentences
Translate sentences
```php
echo $tr->translate("Hello World!");
```
Expand Down

0 comments on commit 57b57a0

Please sign in to comment.