Skip to content

Commit

Permalink
Improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Stichoza committed Jun 2, 2015
1 parent b0f810a commit cd6eab4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,16 @@ $tr->setSource(null); // Another way

#### Get Detected Language

You can also use `getLastDetectedSource()` method both statically and non-statically to get detected language.

```php
$tr = new TranslateClient(null, 'fr');

$text = $tr->translate('Hello World!');
echo $tr->getLastDetectedSource(); // Output: en
```

You can also use `getLastDetectedSource` method statically. `TranslateClient::getLastDetectedSource()`.
echo $tr->getLastDetectedSource(); // Output: en
echo TranslateClient::getLastDetectedSource(); // Output: en
```

> **Note:** Value of last detected source is same for both static and non-static method calls.
Expand Down

0 comments on commit cd6eab4

Please sign in to comment.