PHP code example of josantonius / wp-language

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

    

josantonius / wp-language example snippets




use Josantonius\WP_Language\WP_Language;


Josantonius\WP_Language\WP_Language;

WP_Language::load('textdomain', dirname(plugin_basename(__FILE__)).'/languages/');

echo __('Text to translate', 'textdomain');