PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
  Classes of Dannel  >  PHP Language Change  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Main example
Class: PHP Language Change
Change application language using arrays of text
Author: By
Last change:
Date: 12 days ago
Size: 1,374 bytes
 

 

Contents

Class file image Download
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
  <title>Example</title>
  <style>
  a{
    text-decoration: none;
    color: white;
  }


  span.menu{
    top: 0;
    left: 0;
    position: fixed;
    height:100px;
    width: 100%;
    background-color: #666666;
    color: white;
    display: inline-block;
     text-align: center;
  }
   span.option{
     font-size: 2em;
     display: inline;
     margin: 5px;
   }
   span.option:hover{
     background-color: #8D8D8D;
     cursor: pointer;
   }


  </style>
</head>

<body>
<?php include 'src/langclass.php'; $obj= new lang;?>

<span class="menu">

<span class="option">
<a><?=$obj->setLang()['home']?></a>
</span>
<span class="option">
<?php if($_COOKIE['lang']=='esp'){$l='eng';}else{$l='esp';} ?>
<a href="language.change.php?lang=<?=$l?>"><?=$obj->setLang()['lang']?></a>
</span>
<span class="option">
<a><?=$obj->setLang()['edit']?> </a>
</span>
<span class="option">
<a><?=$obj->setLang()['leave']?></a>
</span>
<span class="option">
<a><?=$obj->setLang()['help']?></a>
</span>
<h2 align="center"><?=$obj->setLang()['welcome']?></h2>
</span>
        <p style="padding-top:110px;">The rest of the page. . .</p>
</body>

</html>