PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of Deyby Vasquez   Add multiple languages to a Web   index.php   Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Main page
Class: Add multiple languages to a Web
Add multiple languages to a Web site very easy.
Author: By
Last change: New example
Date: 14 years ago
Size: 929 bytes


Class file image Download
$language = new Language();
$lang = $language->getLanguage(@$_POST['lang']);
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title><?php echo $lang['title']; ?></title>

<div align="center">
<form name="language" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
    <select onchange = "document.language.submit()" name="lang">
        <option selected="selected"><?php echo $lang['select-language']; ?></option>
        <option value="en"><?php echo $lang['en']; ?></option>
        <option value="es"><?php echo $lang['es']; ?></option>
        <option value="fr"><?php echo $lang['fr']; ?></option>
echo $lang['hello']."<br />";
$lang['page']."<br />";
<a href="page2.php"><?php echo $lang['next']; ?></a>