innomedia / deepl
Silverstripe 4 DeepL Integration
Installs: 473
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/innomedia/deepl
Requires
README
Add this to Page
public function getCMSActions() { $fields = parent::getCMSActions(); $tmp = explode('_', $this->Locale); $lang = strtoupper($tmp[0]); if (Deepl::canTranslate($lang)) { $fields->fieldByName("MajorActions")->push( ConfirmationFormAction::create("doTranslate","Übersetzen")->addExtraClass("btn-primary") ); } return $fields; }