-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.php
81 lines (70 loc) · 2.03 KB
/
config.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php
declare(strict_types=1);
use ReliqArts\AutoTranslator\Service\Translator;
return [
/**
* Base language code - ISO-639
*
* @see https://en.m.wikipedia.org/wiki/ISO_639
*/
'base_language' => env(
'AUTO_TRANSLATOR_BASE_LANGUAGE_CODE',
config('app.locale', config('app.fallback_locale', 'en'))
),
/**
* Languages to auto-translate to. (ISO-639)
*/
'languages' => [
'de',
'es',
'fr',
],
'auto_translate_via' => Translator\SimpleGoogleApiTranslator::class,
/**
* Translator specific configuration keyed by translator slug.
*/
'translators' => [
'simple_google_api_translator' => [
/**
* Translator will wait for {wait_seconds} seconds before making another request after receiving a
* rate limit exception. This wait time increases with the number of attempts such that the wait time for the
* second attempt is {wait_seconds}*2.
*/
'wait_seconds' => 2,
/**
* Max attempts to make per request.
*/
'max_attempts' => 3,
],
'google_cloud_translator' => [
'api_key' => '',
],
'deepl_translator' => [
'api_key' => '',
],
],
/**
* Language switcher specific configuration.
*/
'language_switcher' => [
/**
* Language switcher endpoint.
*/
'endpoint' => 'lang/switch',
/**
* Specify the name of the language switcher route.
*/
'route_name' => 'switch-language',
/**
* Specify bindings such as middleware for the language switcher route.
*/
'route_group_attributes' => [
'middleware' => ['web'],
// 'as' => 'lang.',
],
/**
* Message returned from endpoint when language was switched. Set to 'null' to disable.
*/
'confirmation_text' => 'Language switched.',
],
];