Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
višejezičnosti i php

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side
View previous topic :: View next topic  
Author Message
gog



Joined: 18 Jun 2004
Posts: 679
Location: zagreb

PostPosted: 02.12.2004 13:31    Post subject: višejezičnosti i php Add user to your forum ignore list Reply with quote

Bio sam siguran da je već bila dosta opširna i zanimljiva tema o implementiranju višejezičnih site-ova u kombinaciji sa PHP-om, pretraživanjem nisam uspio ništa naći pa bih bio zahvalan ako bi me netko uputio na pravi thread....
Back to top
View user's profile Send private message Visit poster's website
retro_one



Joined: 16 Sep 2003
Posts: 880
Location: DUBRAVA.

PostPosted: 02.12.2004 14:48    Post subject: Add user to your forum ignore list Reply with quote

ne bi vjerovao...topic se zove: "Izvedba višejezičnog site" Wink

http://www.mi3dot.org/forum/viewtopic.php?t=867

_________________
Just your average eccentric programmer.
Back to top
View user's profile Send private message
gog



Joined: 18 Jun 2004
Posts: 679
Location: zagreb

PostPosted: 03.12.2004 03:16    Post subject: Add user to your forum ignore list Reply with quote

glup Shocked

Ma išao sam searchati višejezični, multilanguage, itd i nije mi ništa pljunuo van, tnx na linku...
Back to top
View user's profile Send private message Visit poster's website
silence



Joined: 24 Apr 2004
Posts: 890
Location: .....ni na nebu, ni na zemlji.....

PostPosted: 03.12.2004 04:00    Post subject: Add user to your forum ignore list Reply with quote

evo kak ja to rješavam....

Code:

if ( !isset ( $_SESSION['jezik'] )) {

    session_register("jezik");
    $_SESSION['jezik'] = "hr";
} else if ( $_GET['jezik'] ){
    $_SESSION['jezik'] = $_GET['jezik'];
}
$jezik = $_SESSION['jezik'];



Code:

$naslov = "naslov".$jezik;
$text = "tekst".$jezik;


Code:

$upit = "SELECT datum, $naslov, $text FROM vijesti WHERE id='1'";


možda nije najelegantnije rješenje, ali je jako lagano za implementirat....
samo kod unosa u bazu treba omogućit da upisuju na kolko god jezika hoće i da držiš izabrani jezik u sessionu....
totalno jednostavno.....naravno ovo je za content.....


za sam layout....
Code:

<img src="elementi/".$jezik."/header.gif">



uglavnom, od kad sam otkrio sessione, zaljubio sam se Laughing

_________________
This End-User License is an agreement between Microsoft Corporation (hereafter referred to as "Microsoft") and you, the end-user (hereafter referred to as "our bitch").
Back to top
View user's profile Send private message Visit poster's website
che.UP
mi3.crew


Joined: 07 Sep 2003
Posts: 2320
Location: zagreb

PostPosted: 03.12.2004 11:41    Post subject: Add user to your forum ignore list Reply with quote

silence wrote:
evo kak ja to rješavam....

Code:

if ( !isset ( $_SESSION['jezik'] )) {

    session_register("jezik");
    $_SESSION['jezik'] = "hr";
} else if ( $_GET['jezik'] ){
    $_SESSION['jezik'] = $_GET['jezik'];
}
$jezik = $_SESSION['jezik'];




damn dude,

php.net wrote:
Caution
if you are using $_SESSION (or $HTTP_SESSION_VARS), do not use session_register(), session_is_registered(), and session_unregister().

_________________
UP | TypeTester | Accommodations App
Meni u Firefox-u ne radi AJAX
Back to top
View user's profile Send private message Visit poster's website
silence



Joined: 24 Apr 2004
Posts: 890
Location: .....ni na nebu, ni na zemlji.....

PostPosted: 05.12.2004 05:11    Post subject: Add user to your forum ignore list Reply with quote

che.UP wrote:


damn dude,

php.net wrote:
Caution
if you are using $_SESSION (or $HTTP_SESSION_VARS), do not use session_register(), session_is_registered(), and session_unregister().



ekčli....EDIT ::

Quote:
If you are using $_SESSION and disable register_globals, do not use session_register(), session_is_registered() and session_unregister(), if your scripts shall work in PHP 4.2 and earlier. You can use these functions in 4.3 and later.

If you enable register_globals, session_unregister() should be used since session variables are registered as global variables when session data is deserialized. Disabling register_globals is recommended for both security and performance reasons.
]

_________________
This End-User License is an agreement between Microsoft Corporation (hereafter referred to as "Microsoft") and you, the end-user (hereafter referred to as "our bitch").
Back to top
View user's profile Send private message Visit poster's website
silence



Joined: 24 Apr 2004
Posts: 890
Location: .....ni na nebu, ni na zemlji.....

PostPosted: 05.12.2004 05:18    Post subject: Add user to your forum ignore list Reply with quote

ovo je sa zadnjeg php manuala koji sam skinuo prije par dana..idem baš na php.net pogledat, sad si me zaintrigirao....

_________________
This End-User License is an agreement between Microsoft Corporation (hereafter referred to as "Microsoft") and you, the end-user (hereafter referred to as "our bitch").
Back to top
View user's profile Send private message Visit poster's website
silence



Joined: 24 Apr 2004
Posts: 890
Location: .....ni na nebu, ni na zemlji.....

PostPosted: 05.12.2004 05:26    Post subject: Add user to your forum ignore list Reply with quote

evo....

Quote:
Before PHP 4.3, if you are using $_SESSION and you have disabled register_globals, don't use session_register(), session_is_registered() or session_unregister().



Quote:

register_globals On On


Quote:
PHP Version 4.3.8



dakle, tam di je to hostano, nema problema.....
baš si mi povuko za jezik Very Happy

znači za svaki server koji je ima update iznad 4.3 ono nije problem....


dapače...looky at this!!!!!!

Quote:
If you enable register_globals, session_unregister() should be used since session variables are registered as global variables when session data is deserialized. Disabling register_globals is recommended for both security and performance reasons.



jesam opet nekaj krivo shvatio? (stvarno, ozbiljno te pitam, pošto poštujem one za koje smatram da znaju više, ali morao sam ić provjerit ovo, znam da sam nedavno čitao drugačije)....

_________________
This End-User License is an agreement between Microsoft Corporation (hereafter referred to as "Microsoft") and you, the end-user (hereafter referred to as "our bitch").
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group