Changes
Page history
update wiki formatting
authored
Nov 01, 2016
by
Vladimir Schneider
Hide whitespace changes
Inline
Side-by-side
Installation.md
View page @
de479ec7
1.
Require this package in your composer.json and run composer update (or run
`composer require
1.
Require this package in your composer.json and run composer update (or run
`composer require
vsch/laravel-translation-manager:*`
directly):
vsch/laravel-translation-manager:*`
directly):
```json
```json
"require": {
"require": {
...
@@ -52,15 +52,15 @@
...
@@ -52,15 +52,15 @@
}
}
```
```
2.
After updating composer, add the ServiceProviders to the providers array in config/app.php
2.
After updating composer, add the ServiceProviders to the providers array in config/app.php
and comment out the original TranslationServiceProvider:
and comment out the original TranslationServiceProvider:
```php
```php
//Illuminate\Translation\TranslationServiceProvider::class,
//Illuminate\Translation\TranslationServiceProvider::class,
Vsch\TranslationManager\ManagerServiceProvider::class,
Vsch\TranslationManager\ManagerServiceProvider::class,
Vsch\TranslationManager\TranslationServiceProvider::class,
Vsch\TranslationManager\TranslationServiceProvider::class,
//Vsch\UserPrivilegeMapper\UserPrivilegeMapperServiceProvider::class,
//Vsch\UserPrivilegeMapper\UserPrivilegeMapperServiceProvider::class,
Collective\Html\HtmlServiceProvider::class,
Collective\Html\HtmlServiceProvider::class,
```
```
The TranslationServiceProvider is an extension to the standard functionality and is required
The TranslationServiceProvider is an extension to the standard functionality and is required
...
@@ -72,7 +72,7 @@
...
@@ -72,7 +72,7 @@
**If you are upgrading from version 2.0.x of LTM** you need to remove the dependency to
**If you are upgrading from version 2.0.x of LTM** you need to remove the dependency to
UserPrivilegeMapper from your application service providers, shown commented out above.
UserPrivilegeMapper from your application service providers, shown commented out above.
3.
add the Facade to the aliases array in config/app.php:
3.
add the Facade to the aliases array in config/app.php:
```php
```php
'Form' => Collective\Html\FormFacade::class,
'Form' => Collective\Html\FormFacade::class,
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
**If you are upgrading from version 2.0.x of LTM** you need to remove the dependency to
**If you are upgrading from version 2.0.x of LTM** you need to remove the dependency to
UserPrivilegeMapper from your application facade alias array, shown commented out above.
UserPrivilegeMapper from your application facade alias array, shown commented out above.
4.
4.
##### Publishing and running migrations
##### Publishing and running migrations
You need to publish then run the migrations for this package:
You need to publish then run the migrations for this package:
...
@@ -108,7 +108,7 @@
...
@@ -108,7 +108,7 @@
translation related tables. See
translation related tables. See
[[Changing the database name|Configuration#changing-the-database-name]]
[[Changing the database name|Configuration#changing-the-database-name]]
5.
5.
##### Publishing the configuration
##### Publishing the configuration
You need to publish the config file for this package. This will add the file
You need to publish the config file for this package. This will add the file
...
@@ -118,14 +118,14 @@
...
@@ -118,14 +118,14 @@
$ php artisan vendor:publish --provider="Vsch\TranslationManager\ManagerServiceProvider" --tag=config
$ php artisan vendor:publish --provider="Vsch\TranslationManager\ManagerServiceProvider" --tag=config
```
```
6.
You need to publish the web assets used by the translation manager web interface. This will
6.
You need to publish the web assets used by the translation manager web interface. This will
add the assets to
`public/vendor/laravel-translation-manager`
add the assets to
`public/vendor/laravel-translation-manager`
```bash
```bash
$ php artisan vendor:publish --provider="Vsch\TranslationManager\ManagerServiceProvider" --tag=public
$ php artisan vendor:publish --provider="Vsch\TranslationManager\ManagerServiceProvider" --tag=public
```
```
7.
7.
##### Configuring WebUI Route
##### Configuring WebUI Route
By default the web interface of the translation manager is no longer mapped to a route. To
By default the web interface of the translation manager is no longer mapped to a route. To
...
@@ -134,7 +134,7 @@
...
@@ -134,7 +134,7 @@
```php
```php
use Vsch\TranslationManager\Translator;
use Vsch\TranslationManager\Translator;
\Route::group(['middleware' => 'web', 'prefix' => 'translations'], function () {
\Route::group(['middleware' => 'web', 'prefix' => 'translations'], function () {
Translator::routes();
Translator::routes();
});
});
...
@@ -160,7 +160,7 @@
...
@@ -160,7 +160,7 @@
],
],
```
```
8.
8.
##### Setting up user authorization
##### Setting up user authorization
TranslationManager uses Laravel 5.2 abilities for providing authorization for various
TranslationManager uses Laravel 5.2 abilities for providing authorization for various
...
@@ -238,9 +238,9 @@
...
@@ -238,9 +238,9 @@
UserPrivilegeMapper definitions added in your application, probably in
UserPrivilegeMapper definitions added in your application, probably in
`app/Providers/AppServiceProvider.php`
`app/Providers/AppServiceProvider.php`
9.
Yandex assisted translations requires setting the
`yandex_translator_key`
to your Yandex API
9.
Yandex assisted translations requires setting the
`yandex_translator_key`
to your Yandex API
key in the
`config/laravel-translation-manager.php`
file, it is free to get and use. See:
key in the
`config/laravel-translation-manager.php`
file, it is free to get and use. See:
<https://tech.yandex.com/translate/>
<https://tech.yandex.com/translate/>
10.
10.
##### Overriding the Web Interface Translations
##### Overriding the Web Interface Translations
...
...
...
...