A super easy PHP Framework for web development! https://github.com/exacti/phacil-framework
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
627 B

6 years ago
<?php
class PluginTranslate extends Dwoo\Block\Plugin
{
// parameters go here if you need any settings
public function init()
{
}
// this can be ommitted, it's called once when the block ends, don't implement if you don't need it
public function end()
{
}
// this is called when the block is required to output it's data, it should read $this->buffer, process it and return it
public function process(){
if (class_exists('Translate')) {
$trans = new Translate();
return $trans->translation($this->buffer);
} else {
return $this->buffer;
}
}
}