← Return to Dashboard
-
demo1
Basic setup to load a message
-
demo2
Undefined message
-
demo5
Dashboard backlink and footer line
-
demo6
Utility examples
-
demo7
Language names
-
demo8
Rendering examples
-
demo9
Domain info
Output
Example message.
Source
<?php
/* Config */
use Krinkle\Intuition\Intuition;
require_once 'demoBase.php';
/* Demonstration */
// 1) Init $I18N
// Pass name of domain to Intuition constructor
$I18N = new Intuition( 'demo' );
// Register the directory from which to load message files
$I18N->registerDomain( 'demo', __DIR__ . '/messages/demo' );
// 2) Get message
echo $I18N->msg( 'example' );
/* View source */
closeDemo( __FILE__ );