PHP code example of tomk79 / langbank

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

    

tomk79 / langbank example snippets



$lb = new tomk79\LangBank('/path/to/list.csv');
$lb->setLang( 'en' );
$lb->get('hello'); // <- "Hello"
csv
"","en"
"goodmorning","Good {{ sample }}!"
csv
"","en"
"goodfoobar","Good {{ sample }}!"
csv
"","en"
"morning","Morning"
"goodmorning","Good {{ _ENV.get('morning') }}!"