Demo: Multilingual support & Constant strings

Welcome to Demo: Multilingual support & Constant strings

Contact us
Support
Say hi!


The End
Change language

/**
** @ lang_en.php
**/
$lang = array();
$lang['Contact']	= 'Contact us';
$lang['Support']	= 'Support';
$lang['Say hi']		= 'Say hi!';
/**
** @ lang_vi.php // Vietnamese
**/
$lang = array();
$lang['Contact']	= 'Liên hệ';
$lang['Support']	= 'Hỗ trợ';
$lang['Say hi']		= 'Xin chào!';
												
/*
* @ index.php
*/
include_once( 'includes/pTemplate.php' );

// include default language
include_once( 'includes/lang_en.php' );

// visitors choose Vietnamese lanauge
if( $dipslay_language == 'vi' ) {
	include_once( 'includes/lang_vi.php' );
}
 
$pTemplate->add_file( 'templates/multilingual_support.html' );
$output = $pTemplate->pparse_file( 'templates/multilingual_support.html' );
 
echo $output;
exit;

Other demos

View Online Documentation