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
Language folders and changing lanugage
Old 11-23-2007, 04:16 AM Language folders and changing lanugage
coldturkey's Avatar
Extreme Talker

Posts: 211
Name: Rachel
Location: Spain
Trades: 3
I am just starting a website and Im doing it in Spanish and English,
I'd like to be able to do the template and the call the lanugage folder for all the text on the page.
But I am very unsure how to do this. I need the site index to be in Spanish and the if a visitor click the english flag icon to then go to english and if they click the spanish flag icon to then go back to spanish.

Can any one shed some light on to the php I'd use for this.

Many thanks
Rachel
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

coldturkey is offline
Reply With Quote
View Public Profile Visit coldturkey's homepage!
 
 
Register now for full access!
Old 11-23-2007, 03:07 PM Re: Language folders and changing lanugage
rogem002's Avatar
PHP Chap

Posts: 843
Name: Mike
Location: United Kingdom
Trades: 0
Why not a PHP session?
__________________
My Blog/Site:
Please login or register to view this content. Registration is FREE
rogem002 is offline
Reply With Quote
View Public Profile Visit rogem002's homepage!
 
Old 11-23-2007, 03:10 PM Re: Language folders and changing lanugage
coldturkey's Avatar
Extreme Talker

Posts: 211
Name: Rachel
Location: Spain
Trades: 3
Can you tell me more on how to do this? Or if you know a site that explains this.

I dont know much if anything on sessions!

Thanks
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

coldturkey is offline
Reply With Quote
View Public Profile Visit coldturkey's homepage!
 
Old 11-24-2007, 09:59 AM Re: Language folders and changing lanugage
Super Talker

Posts: 134
Trades: 0
PHP Code:
<?
session_start
();
if (isset(
$_SESSION['lang']) {
$lang $_SESSION['lang']}
else {
$lang 'en'; }
if (isset(
$_GET['lang'])){
  
$lang $_GET['lang'];

?>
PHP Code:
<a href="<?= $_SERVER['PHP_SELF']; ?>/?lang=en"><img src="english.gif></a> 
<a href="<?= $_SERVER['PHP_SELF']; ?>/?lang=es"><img src="spanish.gif></a>
now $lang have to be in front of the path of your language files
__________________

Please login or register to view this content. Registration is FREE

Check out the Facebook Clone build with Jcow SNS at
Please login or register to view this content. Registration is FREE
, it is free and it always will be
Falcone is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Language folders and changing lanugage
 

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.35422 seconds with 12 queries