forked from mountbatt/kirby-deepl-fields
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
36 lines (36 loc) · 1.23 KB
/
index.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
<?php
Kirby::plugin('mountbatt/deepl', [
'fields' => [
'deepl' => [
'props' => [
'api_key' => function () {
return option('mountbatt.deepl.config.api_key');
},
'api_url' => function () {
return option('mountbatt.deepl.config.api_url');
},
'csrf' => function () {
return kirby()->csrf();
},
'page_id' => function () {
return page()->id();
},
'field_name' => function () {
return $this->name();
}
]
]
],
'translations' => [
'en' => [
'mountbatt.deepl.import' => 'Import from',
'mountbatt.deepl.translatenow' => "Translate now with DeepL",
'mountbatt.deepl.importhelp' => "Loads the value of the field from the original language"
],
'de' => [
'mountbatt.deepl.import' => 'Importiere von',
'mountbatt.deepl.translatenow' => "Übersetze jetzt mit DeepL",
'mountbatt.deepl.importhelp' => "Lädt den Wert des Feldes aus der Originalsprache"
]
]
]);