PHP code example of fsi / translatable

1. Go to this page and download the library: Download fsi/translatable 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/ */

    

fsi / translatable example snippets



declare(strict_types=1);

namespace Tests\Entity;

use DateTimeImmutable;

class Article
{
    private ?int $id = null;
    private ?string $locale = null;
    private ?DateTimeImmutable $publicationDate = null;
    private ?string $title = null;
    private ?string $description = null;

    // getters and setters will probably  private ?Article $article;

    // getters and setters are not 

return [
    // Doctrine and Symfony bundles
    FSi\Component\Translatable\Integration\Symfony\TranslatableBundle::class => ['all' => true]
];