Package Data | |
---|---|
Maintainer Username: | thomasgenster |
Maintainer Contact: | thomasgenster@gmail.com (Thomas Genster) |
Package Create Date: | 2016-11-03 |
Package Last Update: | 2016-12-01 |
Language: | PHP |
License: | Unknown |
Last Refreshed: | 2024-12-19 03:02:11 |
Package Statistics | |
---|---|
Total Downloads: | 51 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 1 |
Total Forks: | 0 |
Total Open Issues: | 0 |
Custom translator for Laravel that prevents the need to use traditional placeholders for getting a translation inside a translation
Add the following to you Providers array (app/config/app.php):
Genster\CustomLaravelTranslator\TranslatorProvider
Remove/uncomment the default provider:
Illuminate\Translation\TranslationServiceProvider
Use [[ ]] as placeholders to have it be replaced by the corresponding translation key.
lang/en/default.php
array(
'hello world' => 'Please contact us at [[contact.phone]]',
)
lang/en/contact.php
array(
'phone' => '+49 12345678'
)