Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Multilingual site script problem
Old 10-16-2008, 10:34 AM Multilingual site script problem
Experienced Talker

Posts: 49
Location: Pula, Istra, Croatia
Trades: 0
I am making multilingual site with this script
Quote:
<?php
// get informations from url
$lang = @$_GET['lang']; // @ supress errors if is lang definition empty
$page = @$_GET['page']; // @ supress errors if is page definiton empty

if($lang == "ger"){ // include ger container and right page
include("container_ger.php");
switch($page) {
case "1": include("1ger.php"); break;
case "2": include("2ger.php"); break;
case "3": include("3ger.php"); break;
default: include("1ger.php");
}
} else {
include("container_eng.php"); // include eng container and right page
switch($page) {
case "1": include("1eng.php"); break;
case "2": include("2eng.php"); break;
case "3": include("3eng.php"); break;
default: include("1eng.php");
}
}
?>
And I make link with this
Quote:
<?php
echo "<a href = www.yoursite.com/index.php?lang=ger&page=$page> Germany </a>" ;
?>
or for same language and different page:

PHP Code:
<?php
echo "<a href = www.yoursite.com/index.php?lang=$lang&page=3> Go to page 3</a>" ;
?>
BUT!! The link are generated by ECHO command...I know how to make it an image and text but now I want to make drop drop down menu and I dont know how to make it.How to include echo function in drop down menu??

If you know how or you have different script for changing pages please post..

tnx
shile is offline
Reply With Quote
View Public Profile Visit shile's homepage!
 
 
Register now for full access!
Old 10-16-2008, 02:00 PM Re: Multilingual site script problem
Experienced Talker

Posts: 44
Trades: 0
echo '<select name="xxx">
<option value="something">something</option>
</select>';
Onkel E is offline
Reply With Quote
View Public Profile
 
Old 10-16-2008, 04:31 PM Re: Multilingual site script problem
Experienced Talker

Posts: 49
Location: Pula, Istra, Croatia
Trades: 0
TNX

but for my level of knowledge I need more details

only this does not work , even if I put link spec in value...
shile is offline
Reply With Quote
View Public Profile Visit shile's homepage!
 
Old 10-17-2008, 06:19 AM Re: Multilingual site script problem
stoot98's Avatar
Ultra Talker

Posts: 427
Name: Stuart
Location: Glasgow, Scotland
Trades: 0
That code will not simulate a link click and thus take you to the desired page. You will need to add code to handle that. Something like...

http://www.google.co.uk/search?hl=en...p+menu&spell=1
stoot98 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Multilingual site script problem
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13317 seconds with 12 queries