InMotion Hosting Support Center

In our last few tutorials, we have covered the $this variable in Joomla 2.5 templates. We will continue focusing on $this, and this time examining the following code:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>" >

The output of the above PHP code results in the following code being shown in our pages:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb" lang="en-gb" dir="ltr" >

If you are familiar with PHP, you can see that the value of $this->language is en-gb. en-gb stands for the English language as used in the United Kingdom.

If we change the language in Joomla 2.5 to Spanish, you can see that the value of $this->language changes to es-es:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es-es" lang="es-es" dir="ltr" >
Continued Education in Course 219: Joomla 2.5 Template Development Tutorial
You are viewing Section 10: Joomla 2.5 Templates - $this->language
Section 9: Joomla 2.5 Templates - $this->template
Section 11: Joomla 2.5 Templates - $this->direction

Joomla Community Google+ Hangout #3

June 3rd, 2014

Thank you @RustyJoomla for letting me speak on the Joomla Community Google+ Hangout!

Click here to watch!

Support Center Login

Our Login page has moved, Click the button below to be taken to the login page.

Social Media Login

   
Social Login Joomla

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

0 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!