Jump to content

User:Darkdeath-2/common.js

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Darkdeath-2 (talk | contribs) at 06:10, 24 October 2021. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
<?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__ );