PHP code example of chinleung / verbose-localization
1. Go to this page and download the library: Download chinleung/verbose-localization 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/ */
chinleung / verbose-localization example snippets
php
class NumberClass
{
use ChinLeung\VerboseLocalization\HasVerboseLocalization;
/**
* Constructor of the class.
*
* @param int $value
*/
public function __construct(int $value)
{
$this->value = $value;
}
/**
* Retrieve the translation in a specific locale.
*
* @param string $locale
* @return string
*/
public function getTranslationIn(string $locale) : string
{
$translations =