skrach Posted November 20, 2007 Author Report Posted November 20, 2007 es visu gandriz saprotu..bet nezinu ka to istenot.. man vajadetu vienkarshu kodu kursh veiks language funkcijas.. mana situacija man vajag kodu iesh header un lang.php failu.. lai stradatu..bet tos kodus nezinu.. :)
andrisp Posted November 20, 2007 Report Posted November 20, 2007 Nu nerakstīs tev neviens priekšā. Mācies pats.
skrach Posted November 20, 2007 Author Report Posted November 20, 2007 esmuj pa stulbu lai iemaaciitos.. :(
andrisp Posted November 20, 2007 Report Posted November 20, 2007 (edited) 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 November 20, 2007 by andrisp
skrach Posted November 20, 2007 Author Report Posted November 20, 2007 nemaaceeshu...es pats esmu tikai dizainers..maku ar css straadat.. bet ar php ir problema! :)
andrisp Posted November 20, 2007 Report Posted November 20, 2007 Nu tad nāksies vien kādu nolīgt, kas tev palīdzēs.
skrach Posted November 20, 2007 Author Report Posted November 20, 2007 A tu negribi paliidzeet! :) ja nav ko dariit.. :)
andrisp Posted November 20, 2007 Report Posted November 20, 2007 Es varu pēc plkst. 18:00. Par stundas likmi vienosimies. ;) Enīvei - domu saprati ? Vai nu mācies pats vai arī maksā kādam, kas māk.
skrach Posted November 20, 2007 Author Report Posted November 20, 2007 khhm... davai pec 18:00 parunaasim..raksti man PM
skrach Posted November 20, 2007 Author Report Posted November 20, 2007 un kaa taalaak.. uztaiiist lang.php failu ielikt tur ti°o kodu..tad header.php ielikt include($_GET['lang']."_lang.php"); un kaa lai piespiezot straadaatu??
marcis Posted November 21, 2007 Report Posted November 21, 2007 ja tev ir inklūdot vajadzīgais fails, kurā ir valodas mainīgie tad viss jau strādā
ViszinisA Posted November 21, 2007 Report Posted November 21, 2007 (edited) šķiet ka viņš nesaprot nemaz kā tas notiek... pats princips izmantojot php vel kas šķiet ir tas, ka japaskaidro viņam nevis scripta uzbūve, bet algoritma uzbūve, kā tas notiek [valodu maiņa] Edited November 21, 2007 by ViszinisA
localhero Posted December 7, 2007 Report Posted December 7, 2007 Sakuma iedod valodas cepumu, pec tam ieliec cepuma mainigo sesija. Atkariba no ta includo valodas datni (lang/english.php chinese.php espanjola.php).
Recommended Posts