Language files are text files in Joomla 3.0 that basically list a set of common words for a specific language. The English language file may define a greeting as Hello, while a Spanish language file would define greeting as Hola.

There are many words in your Joomla 3.0 site that are printed using this type of reference. For example, if Joomla wanted to print "greeting" on your screen, the php code would reference something like GREETING. Then, based upon the language Joomla is using, it will determine the appropriate word to use, Hello or Hola.

Let's take a look at a real life example

written-byIf you click on the Screenshot to the right, you will see highlighted where Joomla writes, "Written by", referring to who wrote the article. In our example, we have two authors showing:

  1. Written by Super User
  2. Written by Joomla
 

How are language files used?

That text, Written by, is actually defined in the following language files:

FileConstantValue
language/en-GB/en-GB.com_content.ini COM_CONTENT_WRITTEN_BY Written by%s
language/es-ES/es-ES.com_content.ini COM_CONTENT_WRITTEN_BY Escrito por%s

Because we have both English and Spanish installed, the Written by language will change based upon which language we have our site set to use.

When the Joomla code references the Constant, COM_CONTENT_WRITTEN_BY, it replaces it with the Value defined in the language file. The value, in this case, includes %s. That variable, %s, will be replaced by the author of the article. So, if the article was written by Bob:

The Joomla code would read:The result on your website would be:
<?php echo JText::sprintf('COM_CONTENT_WRITTEN_BY', $author); ?>
If English:
Written byBob

If Spanish:
Escrito porBob

 

How can I change language files?

Very good question! Technically you can simply edit the language file but it is not recommended. Instead, click here to learn more about Using Language Overrides in Joomla 3.0 to change language text.
Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve our Support Center:
Email Address
Optional, but our team may contact you for more information.
Like this Article?

Post a Comment

Name:
Email Address:
Comment:
Are you a bot?
Submit

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

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

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!