forked from humhub/translation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Module.php
37 lines (30 loc) · 915 Bytes
/
Module.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
<?php
namespace humhub\modules\translation;
use Yii;
use humhub\components\Module as HumHubModule;
use humhub\modules\translation\models\BasePath;
class Module extends HumHubModule
{
/**
* @var string Google API key (optional, if empty, no automatic translation)
* For automatic translation:
* - Activate the API Cloud Translation: https://console.developers.google.com/apis/library
* - Get your Google API key: https://console.developers.google.com/apis/api/translate.googleapis.com/credentials
*/
public $googleApiKey;
/**
* @var string Google API URL V2
*/
public $googleApiUrl = 'https://www.googleapis.com/language/translate/v2';
/**
* Returns all Messages
*
* @param type $lang
* @param string $section
* @return array
*/
public function getTranslationMessages($file)
{
return require($file);
}
}