Skip to content

Commit

Permalink
Translation: Added english language
Browse files Browse the repository at this point in the history
  • Loading branch information
AntikCz committed Mar 2, 2016
1 parent c4e5cc9 commit 7a17e88
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ foreach ($images as $page => $invoice) {
## Translations
At first visit [core](https://github.com/WebChemistry/Invoice/blob/master/src/Translator.php) component.

Supported languages: English (en), Czech (cs)

Change language:
```php
$invoce->getTranslator()->setLang('en');
Expand All @@ -109,7 +111,7 @@ or you can send pull-request with your translation to core component.
## Previews

First page:
![first page](http://i.imgbox.com/aykrwnkq.jpg)
![first page](http://i.imgbox.com/pwFByZ1L.jpg)

Second page:
![second page](http://i.imgbox.com/7fvkelxr.jpg)
![second page](http://i.imgbox.com/ebrwXldf.jpg)
28 changes: 27 additions & 1 deletion src/Translator.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,37 @@ class Translator implements ITranslator {
'tax' => 'DPH',
'subtotal' => 'Mezisoučet',
'dueDate' => 'Datum splatnosti'
],
'en' => [
'subscriber' => 'Subscriber',
'vat' => 'VAT number',
'vaTin' => 'VATIN',
'date' => 'Date',
'invoice' => 'Invoice',
'invoiceNumber' => 'Invoice number',
'taxPay' => '',
'notTax' => 'VAT unregistered',
'paymentData' => 'Payment information',
'page' => 'Page',
'from' => '/',
'totalPrice' => 'Total price',
'item' => 'Item',
'count' => 'Quantity',
'pricePerItem' => 'Price per item',
'total' => 'Total',
'accountNumber' => 'Account number',
'swift' => 'Swift',
'iban' => 'Iban',
'varSymbol' => 'Variable symbol',
'constSymbol' => 'Constant symbol',
'tax' => 'TAX',
'subtotal' => 'Subtotal',
'dueDate' => 'Due date'
]
];

/** @var string */
private $lang = 'cs';
private $lang = 'en';

/**
* @param string $message
Expand Down

0 comments on commit 7a17e88

Please sign in to comment.