Skip to content

Commit c96f973

Browse files
committed
Doc update
1 parent de9be13 commit c96f973

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,14 @@ php artisan laravelcms --action=clear
6161
- Set both app_id & app_key to google_free_001, then our CMS will use package https://github.com/dejurin/php-google-translate-for-free to do the translate. (It's the default)
6262
- Set both app_id & app_key to google_free_002, then our CMS will use the package https://github.com/Stichoza/google-translate-php to do the translate, YOU NEED INSTALL THE PACKAGE VIA COMMAND LINE FIRST: composer require stichoza/google-translate-php
6363

64+
```json
65+
{
66+
"api_provider": "google_free",
67+
"app_id": "google_free_002",
68+
"app_key": "google_free_002"
69+
}
70+
```
71+
6472
## Improve this plugin & documents
6573

6674
- You are very welcome to improve this plugin and how to use documents

src/Controllers/TranslatorController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function update($form_data, $page, $plugin_settings)
110110
// Need copy the class code to the GoogleTranslateForFree.php
111111

112112
$tr = new GoogleTranslateForFree();
113-
$api_result = $tr->translate($form_data['translate_from'], $form_data['translate_to'], $form_data['translate_content'], 2).$plugin_settings['app_key'];
113+
$api_result = $tr->translate($form_data['translate_from'], $form_data['translate_to'], $form_data['translate_content'], 2);
114114
}
115115

116116
if ($api_result) {

0 commit comments

Comments
 (0)