PHP Classes

File: demo.php

Recommend this page to a friend!
  Classes of Muhammed Mamedov  >  Language Definition  >  demo.php  >  Download  
File: demo.php
Role: Example script
Content type: text/plain
Description: Demonstration loading ru_lang.php from /lang dir
Class: Language Definition
Retrieve application texts for multiple idioms
Author: By
Last change:
Date: 7 years ago
Size: 743 bytes


Class file image Download

$language='ru'; //you can set this through a session or cookie or whatever
$lng = new LanguageDefinition('lng'); //you need to pass string with the name of the variable

//optional, setting debug mode

This data comes from language file:
This data also comes from the same language file:
This will print 'pants', because it isn't defined in our language file
Output Debug info (prints array containing term 'pants')
<?php print_r($lng->getDebug())?>