PHP code example of sonofwinter / translation-bundle
1. Go to this page and download the library: Download sonofwinter/translation-bundle 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/ */
sonofwinter / translation-bundle example snippets
/**
* @var string
* @Translate(key="firstname")
*/
private $firstname;
/**
* @var string
* @Translate(key="lastname", setter="setOtherName")
*/
private $lastname;
use SOW\TranslationBundle\Attribute\Translation;
class MyClasse {
#[Translation(key: "firstname")]
private string $firstname = '';
#[Translation(key: "lastname", setter: "setOtherName")]
private string $lastname = '';
}