Changing xml:lang

GK User
Mon Mar 26, 2012 1:42 am
Hi, I'm working on a multi-language site and, right now, all my pages are set as xml:lang="en" lang="en" (line 44 in default.php in /templates/gk_finance_business/layouts). How can I adjust this code in order to display the correct language code for the other languages in the site? Thank you! :)
User avatar
Fresh Boarder

GK User
Mon Mar 26, 2012 3:36 pm
Hi,

In the file, try changing:
Code: Select all
xml:lang="pl" lang="pl"

To:
Code: Select all
xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>"


Cheers,
User avatar
Platinum Boarder

GK User
Mon Mar 26, 2012 5:24 pm
Hi, I've done that, I've also changed android.php, handheld.php and iphone.php. Right now, my code in default.php is the following:
Code: Select all
<html xmlns="http://www.w3.org/1999/xhtml"
     xmlns:og="http://ogp.me/ns#"
     xmlns:fb="http://www.facebook.com/2008/fbml"
     xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>">

but the generated page source code is:
Code: Select all
<html xmlns="http://www.w3.org/1999/xhtml"
     xmlns:og="http://ogp.me/ns#"
     xmlns:fb="http://www.facebook.com/2008/fbml"
     xml:lang="" lang="">

As you can see, there is no language code between the double quotes... How can I sort this out, pleeeease? :D Using Financial Business v2.7 on Joomla! 2.5.3 and K2 2.5.5 Thank you!
User avatar
Fresh Boarder

GK User
Tue Mar 27, 2012 2:31 pm
Sorry I gave you wrong code, this one should work as I have tested it already:
Code: Select all
xml:lang="<?php echo $this->API->language; ?>" lang="<?php echo $this->API->language; ?>"


Cheers,
User avatar
Platinum Boarder

GK User
Tue Mar 27, 2012 4:55 pm
Thank you! It works like a charm. Please mark the topic solved. Cheers! :)
User avatar
Fresh Boarder

GK User
Tue Mar 27, 2012 5:02 pm
You're welcome, just feel free to let me know if you need any more helps.

Have a nice day,
User avatar
Platinum Boarder


cron