PHP code example of brightnucleus / localization

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

    

brightnucleus / localization example snippets


 namespace Localization\Example;

use BrightNucleus\Localization\LocalizationTrait;

class TranslatedClass {

	use LocalizationTrait;

	public function register() {

		$this->loadLocalization(
			'bn-localization-example',
			__DIR__ . '/../languages'
		);

		// Your normal registration comes here, knowing that all `gettext`
		// strings have already been translated.
	}
}