Jump to content
php.lv forumi

Multilanguage


skrach

Recommended Posts

Nu gan. Imo neviens nav tik stulbs.

 

<?php
$languages = array('lv', 'en', 'ru');

if (isset($_GET['lang']) && in_array($_GET['lang'], $languages)) {
 $_SESSION['lang'] = $_GET['lang'];
} elseif (!isset($_SESSION['lang'])) {
 $_SESSION['lang'] = 'lv';
}

require('lang/'.$_SESSION['lang'].'.php');
?>

 

Tālāk pielāgot un izmantot taču mācēsi ?

Edited by andrisp
Link to comment
Share on other sites

  • 3 weeks later...
×
×
  • Create New...