PHP code example of helionogueir / languagepack

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

    

helionogueir / languagepack example snippets


use helionogueir\languagepack\Lang;
Lang::configuration("en-US");
Lang::addRoot("helionogueir/languagepack", "./languagepack/core");
echo Lang::get("languagepack:test:get", "helionogueir/languagepack", Array("method" => "Usage"));

/* Configuration Smarty */
use Smarty;
$smarty = new Smarty();
$smarty->addPluginsDir("./languagepack/core/modifier");

/* Template (.tpl) smarty_modifier_languagepack_lang Called  */
<p>{"languagepack:test:get"|languagepack_lang:"helionogueir/languagepack":["method" => "Usage"]}</p>