PHP code example of chunhei2008 / hyperf-translation

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

    

chunhei2008 / hyperf-translation example snippets


php bin/hyperf.php  vendor:publish chunhei2008/hyperf-translation


your/config/path/autoload/translation.php



$translator = $this->container->get(\Chunhei2008\Hyperf\Translation\Contracts\Translator::class);

$translator->trans('validation.accepted'),