PHP code example of tectonic / localisation

1. Go to this page and download the library: Download tectonic/localisation library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

tectonic / localisation example snippets



$object = new TranslatableObject();

$translator = new \Tectonic\Localisation\Translator\Engine;
$translator->translate($object);


$translator->registerTransformer(new MyTransformer);


class MyTransformer implements Transformer {
    public function isAppropriateFor($object) {}
    public function transform($object) {}
}