PHP code example of codelight / babelfish
1. Go to this page and download the library: Download codelight/babelfish 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/ */
codelight / babelfish example snippets
load_theme_textdomain('your_text_domain', get_stylesheet_directory());
// Register aliases and corresponding strings:
babelfish()->register([
'button.payment' => __('Complete payment', 'your_text_domain'),
'button.cta' => __('Buy now for only %s!', 'your_text_domain'),
]);
<button>
echo _t('button.payment'); // Complete payment!