PHP code example of house-of-code / dn-translate

1. Go to this page and download the library: Download house-of-code/dn-translate 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/ */

    

house-of-code / dn-translate example snippets


Nodes\Translate\ServiceProvider::class

'Translate' => Nodes\Translate\Support\Facades\Translate::class

translate($key, $replacements = [], $locale = null, $platform = null)

translate_app($app, $key, $replacements = [], $locale = null, $platform = null)

translate_or_fail($key, array $replacements = [], $locale = null, $platform = null)

translate_app_or_fail($application, $key, $replacements = [], $locale = null, $platform = null)

translate_with_fallback($key, $fallback, array $replacements = [], $locale = null, $platform = null)

translate_app_with_fallback($application, $key, $fallback, $replacements = [], $locale = null, $platform = null)
bash
php artisan vendor:publish --provider="Nodes\Translate\ServiceProvider"
bash
php artisan vendor:publish --provider="Nodes\Translate\ServiceProvider" --force