Jump to content

Recommended Posts

OK, I am really new and naive to php so please be nice!

 

I am running a moderately popular php shopping cart script

 

The use global language variables in the site, so I was hoping to detect the language, and show my custom pages in that language.

 

I'm using iframes to show my custom content.

 

So I need to do something like this (but in php of course  :-[)

 

if 'language_variable' = 'english' then echo '<iframe src="content_en.html" />;
if 'language_variable' = 'chinese_simp' then echo '<iframe src="content_zh_cn.html" />;
if 'language_variable' = 'chinese_trad' then echo '<iframe src="content_zh_tw.html" />;
if 'language_variable' = 'japanese' then echo '<iframe src="content_jp.html" />;

 

I think this should be pretty simple right? If I knew some basic PHP :(

Link to comment
https://forums.phpfreaks.com/topic/67774-if-then-question/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.