PHP Classes

HTML Language Selector for OnTime: Select the language of texts to display on a page

Recommend this page to a friend!
  Info   Example   Screenshots   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 20 All time: 11,288 This week: 455Up
Version License PHP version Categories
html-lenguage-select 1.0Proprietary Licen...5HTML, PHP 5, Databases, Traits
Description 

Author

This package can show how to select the language of texts to display on a page.

It provides a class that extends the OnTime package class and its traits to set the language that should be used to retrieve the texts that can be used on the current page.

The package comes with an example that uses PHP sessions to store and retrieve the language that is selected to display the page texts.

Picture of Mario Carrocera
  Performance   Level  
Name: Mario Carrocera is available for providing paid consulting. Contact Mario Carrocera .
Classes: 18 packages by
Country: Mexico Mexico
Age: 59
All time rank: 309536 in Mexico Mexico
Week rank: 180 Up3 in Mexico Mexico Up
Innovation award
Innovation award
Nominee: 2x

Winner: 1x

Example

<?php
//ini_set('display_errors', true);
//error_reporting(E_ERROR | E_PARSE | E_NOTICE | E_WARNING);

function clean_input($data){$data=trim($data);$data=stripslashes($data);$data=htmlspecialchars($data);return $data;}
session_name ('mg');
session_start();
if ( ! isset (
$_SESSION["iniciada"]) ) {
       
$_SESSION["iniciada"] = 'Yes';
       
$_SESSION['leng'] = 'none';
       
session_write_close();
       
session_start();
}

if(
$_SERVER["REQUEST_METHOD"]=="GET"){ if(isset($_GET["leng"])) {
   
$_SESSION['leng']=clean_input($_GET["leng"]);}}
if(
$_SERVER["REQUEST_METHOD"]=="POST"){if(isset($_POST["leng"])){
   
$_SESSION['leng'] = clean_input($_POST["forma"]);}}



include_once(
'HtmlClass.php');
$html = new html();
$aread$html->LngRad($_SESSION['leng']);
$html->SetPage('page');
$html->SetMeta('screen');
$html->SetGoogle('letters');
$html->SetCss('MainCss');
$html->SetLayOut('Layout');
?>

<!DOCTYPE html>
<html>
    <?php $html->Getheader();
         
$html->GetLayout();?>
</html>


Details

How use OnTime backend to store and setup layout, that include a lenguage selector on the web

The OnTime framework is designed to be modular, scalable and comprehensive, so that each new feature integrates without difficulty and maintains a unique class definition (OnTime) and all "additional classes" are "trait" that enrich it, in such a way that an integrated system is obtained, not separate programs which do not necessarily have to behave correctly together.

This is just a sample to show how todo, can add o remove all tag you wan

Installation in test environment:

1.- Copy all the files in the directory where was instaled OnTime

2.- With the browser of your preference, locate the directory and enter it

3.- Execute the Setup.php file

4.- When executing the file, the files the required environment was created

Recommendations:

If you know how to create a subdomain that points to the "demo" directory, it is more comfortable and realistic.

After install

1.- Select the file FillDataxxx.php, to create sample data, can use it to adapt as you need. 2.- The file HtmlPage.php show the result in the browser,

mario.carrocera@hotmail.com


Screenshots (5)  
  • MLDefaul.png
  • mllengeng
  • mllnmx-png
  • mllrndps.png
  • mlsc.png
  Files folder image Files (29)  
File Role Description
Files folder imagepublic (14 files)
Accessible without login Image file bg.png Data Auxiliary data
Accessible without login Plain text file FillData006.php Example Example script
Plain text file HtmlClass.php Class Class source
Accessible without login Plain text file HtmlPage.php Example Example script
Accessible without login Plain text file licencia Data Auxiliary data
Accessible without login Plain text file license Lic. License text
Accessible without login Image file otfavicon.ico Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file Setup.php Example Example script
Accessible without login Plain text file Setupf.php Example Example script

  Files folder image Files (29)  /  public  
File Role Description
  Accessible without login Image file 16x10.png Data Auxiliary data
  Accessible without login Image file 16x9.png Data Auxiliary data
  Accessible without login Image file 4x3.png Data Auxiliary data
  Accessible without login Image file Brasil.png Icon Icon image
  Accessible without login Image file EEUU.png Icon Icon image
  Accessible without login Image file favicon.ico Data Auxiliary data
  Accessible without login Image file mglogo30.png Icon Icon image
  Accessible without login Image file ontime.png Data Auxiliary data
  Accessible without login Image file ontimer.png Icon Icon image
  Accessible without login Image file Portugal.png Icon Icon image
  Accessible without login Image file ReinoUnido.png Icon Icon image
  Accessible without login Image file v16x10.png Data Auxiliary data
  Accessible without login Image file v16x9.png Data Auxiliary data
  Accessible without login Image file v4x3.png Data Auxiliary data

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
Downloadhtml-lenguage-select-2021-06-07.zip 5799KB
Downloadhtml-lenguage-select-2021-06-07.tar.gz 5803KB
Install with ComposerInstall with Composer
Needed packages  
Class DownloadWhy it is needed Dependency
HTML Metatags using PHP on Time Download .zip .tar.gz Implement HTML Tags Optional
HTML Google Fonts using PHP on Time Download .zip .tar.gz Implement Google Font on HTML Optional
HTML CSS Styles using PHP on Time Download .zip .tar.gz Implements Css Html Optional
HTML LayOut using PHP on Time Download .zip .tar.gz Implement Layout Optional
HTML Nav bar using PHP on Time Download .zip .tar.gz Implements a Nav Bar Optional
HTML Include Images and Text using PHP on Time Download .zip .tar.gz Implements a image & text Optional
PHP Creative Commons Logo Download .zip .tar.gz nice tool Recommended
PHP NoSQL Database OnTime Download .zip .tar.gz NoSQL Database Required
 Version Control Unique User Downloads Download Rankings  
 82%
Total:20
This week:0
All time:11,288
This week:455Up