Skip to content

Commit

Permalink
section with translations
Browse files Browse the repository at this point in the history
  • Loading branch information
AntikCz committed Mar 2, 2016
1 parent ec6e3af commit 0eb67c4
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,30 @@ foreach ($images as $page => $invoice) {
}
```

## Translations
At first visit [core](https://github.com/WebChemistry/Invoice/blob/master/src/Translator.php) component.

Change language:
```php
$invoce->getTranslator()->setLang('en');
```

Custom translator:
```php

class MyTranslator implements Nette\Localization\ITranslator {

public function translate($message, $count = NULL) { // $count is unnecessary
// ...
}

}

$invoice->setTranslator(new MyTranslator());
```

or you can send pull-request with your translation to core component.

## Previews

First page:
Expand Down

0 comments on commit 0eb67c4

Please sign in to comment.