Results 1 to 5 of 5
-
15th Sep 2012, 09:28 PM #1OPMember
Little PHP question
Hello guys,
Maybe you can help me with a little question about PHP...
Im starting to program myself, and Im now making one of my websites multi-language.
Can I use this code inside the <title> tags?
PHP Code:<title><?php echo $lang['TITLE']; ?></title>
PHP Code:<meta name="description" content="<?php echo $lang['DES']; ?>" />
<meta name="keywords" content="<?php echo $lang['KEY']; ?>" />
I just dont want to screw my website position on search engines... :-)
Sorry for the newbie question..
--------------------------------
EDIT
--------------------------------
Btw, Im adding this code in the top of my php files:
PHP Code:<?php include("lang/en.php");?>
Or is better to use this?
PHP Code:<html lang="en-US" ...
If yes, what is the code to show the text that I want?
Thanks!Divvy Reviewed by Divvy on . Little PHP question Hello guys, Maybe you can help me with a little question about PHP... Im starting to program myself, and Im now making one of my websites multi-language. Can I use this code inside the <title> tags? <title><?php echo $lang; ?></title> And this in meta tags? <meta name="description" content="<?php echo $lang; ?>" /> Rating: 5
-
16th Sep 2012, 03:17 PM #2Respected Member
The way you have is fine. But for the language you need both . The words are located in the appropriate php file and in the html lang you tell the browser what language you are using.
-
16th Sep 2012, 05:01 PM #3MemberWebsite's:
PulsedMedia.comas long as it's processed as PHP, yes definitively.
shorthand even: <?=$lang['DES'];?> might work, depending upon configuration you have.
-
17th Sep 2012, 01:24 AM #4OPMember
Thank you guys!
-
18th Sep 2012, 03:59 PM #5Respected Member
You are welcome.
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
<?php tag question
By Porsche_maniak in forum Web Development AreaReplies: 7Last Post: 1st Feb 2012, 10:35 PM -
DLE question
By Divvy in forum Webmaster DiscussionReplies: 4Last Post: 2nd Apr 2011, 03:00 PM -
question about windows server before i buy and question about wrzhost
By priviet02 in forum Hosting DiscussionReplies: 5Last Post: 3rd Jan 2010, 05:23 PM -
question
By priviet02 in forum Hosting DiscussionReplies: 2Last Post: 24th Sep 2009, 02:07 PM -
Question!
By Luke in forum General DiscussionReplies: 8Last Post: 23rd Sep 2009, 03:30 PM
themaCreator - create posts from...
Version 3.17 released. Open older version (or...