goma smile Posted March 22, 2008 Report Share Posted March 22, 2008 (edited) Es zinu ka uz pa6taisitas lapas var uzlikt vairakas valodas (un tas izveleties Lv,eng,Ru.....)..... piemers ir aptuveni ta : ka uztaisa papku valodas tur uztaisit failus kadas valodas gribi piemeram lat.lang eng.lang rus.lang vai kautka ta Piemeram tajos failos ieraksta (<.News.> "jaunumi"; Ta butu lat.lang faila (<.News.> "news"; Ta butu eng.lang faila un piemeram taja faila kur gribi redzet izmainas ieraksti <h3><.News.></h3> Un tad weba kautkur var izveleties kadas valodas gribi Lv,eng,Ru..... Bet man vaig vai kads zin ka izdarit lai parmestu uz tam valodam kad uzpiez Lv,eng,Ru..... Butu labi ja kadam butu kads piemers ka un ka tajos lang failos butu jadara Edited March 22, 2008 by goma smile Link to comment Share on other sites More sharing options...
Zandis Murāns Posted March 22, 2008 Report Share Posted March 22, 2008 Es nezinu, kā citi, bet es var teikt neko nesapratu, ko tu girbi. Link to comment Share on other sites More sharing options...
martins256 Posted March 22, 2008 Report Share Posted March 22, 2008 pēc kā nosaki kuru valodi lietot ? Link to comment Share on other sites More sharing options...
Aleksejs Posted March 22, 2008 Report Share Posted March 22, 2008 (edited) Dažas interesantas lietas, ko atradu Googlē pēc atslēgas vārdiem: how to make multilanguage php Creating A Simple Multi Language System Multi language PHP scripting P.S. Tīri personīgi man nepatīk 6āds p13ra}{ts. Bet tas nu tā... P.P.S. Tas 13dots izskatās interesants forums. ;) Edited March 22, 2008 by Aleksejs Link to comment Share on other sites More sharing options...
goma smile Posted March 22, 2008 Author Report Share Posted March 22, 2008 Es tur biju pet isti nevareju saptrast varetu pateikt kodu uz lang faila un faila kur ir vajadziga tulkosana un to lai kad uzpiez lv vai rus atvras sava valoda Link to comment Share on other sites More sharing options...
anonīms Posted March 22, 2008 Report Share Posted March 22, 2008 Man personīgi strādā ar sesijām: <?php if(isset($_REQUEST['set_lang'])){ if($_REQUEST['set_lang'] == "lv" OR $_REQUEST['set_lang'] == "en" OR $_REQUEST['set_lang'] == "ru"){ //$_SESSION['lang'] = $_REQUEST['set_lang']; // setcookie("nwd_lang",$_REQUEST['set_lang']); $_SESSION['valoda'] = $_REQUEST['set_lang']; header ("Location: http://eip.wc3.lv"); //echo "<meta http-equiv=refresh content='0;url=".$_SERVER['PHP_SELF'].">"; } } //$_SESSION['lang'] switch($_SESSION['valoda']){ case 'en': //latvieshu valoda, ja izveeleeta include("valodas/en.php"); break; case 'ru': //krievu valoda, ja izveleta include("valodas/ru.php"); break; default: //galvenaa valoda include("valodas/lv.php"); break; } ?> Link to comment Share on other sites More sharing options...
goma smile Posted March 22, 2008 Author Report Share Posted March 22, 2008 un ka var parslegties ? Link to comment Share on other sites More sharing options...
Aleksejs Posted March 22, 2008 Report Share Posted March 22, 2008 padodot caur URL (vai ar GET,POST caur formu) mainīgo set_lang. Piemēram, http://goma.smile.lapa.lv/lapa.php?set_lang=kz (ja jāpārslēdzas uz Kazahu valodu) Link to comment Share on other sites More sharing options...
goma smile Posted March 23, 2008 Author Report Share Posted March 23, 2008 Nu ta es ieks faila index.php ierkakstu ko gribu kas tulkojas <?php echo $web_lang['Jaunumi'];?> Un iek6 tiem en.php...... ierakstu $web_lang['Jaunumi'] = "News"; tad es ieraktsu http://nosaukums.oo.lv/index.php?set_lang=en un tad ma paradas Warning: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\index.php:7) in C:\AppServ\www\index.php on line 322 Link to comment Share on other sites More sharing options...
Aleksejs Posted March 23, 2008 Report Share Posted March 23, 2008 Un šo "always on top" pavedienu izlasīji? Link to comment Share on other sites More sharing options...
Mikijs Posted March 23, 2008 Report Share Posted March 23, 2008 <?php if(!$_SESSION["mana_valoda"]) $_SESSION["mana_valoda"] = "lv"; if($_GET["v"]) $_SESSION["mana_valoda"] = $_GET["v"]; define("VALODA", $_SESSION["mana_valoda"]); include("valodas_fails/".VALODA."/valoda.lng); // Piemeram.. echo "<a href='?v=rus'>$txt[001]</a> | <a href='?v=lv'>$txt[02]</a>"; echo "<p>-> ".VALODA; ?> Link to comment Share on other sites More sharing options...
Recommended Posts