Page 1 of 1

What are the common causes for language files not working?

Posted: Fri Apr 06, 2012 8:39 pm
by Presto-X
Hello everyone,

What are some common reasons that would keep a language file from working, the component just displays the tags like so LABEL NAME, or LABEL EMAIL, etc. I noticed it in Joomla 2.5.4, I have never had a problem getting them to load in any of my custom Joomla 1.5.x to 2.5.3 components in the past, I am stumped.

So I'm just wondering what some of the common causes are that would affect the language file from loading.

Thanks everyone, please leave your thoughts below.

Re: What are the common causes for language files not workin

Posted: Fri Apr 06, 2012 8:43 pm
by Per Yngve Berg
There is difference in the 2.5 and 1.5 format.

The file is not stored as UTF8 without BOM.

Re: What are the common causes for language files not workin

Posted: Fri Apr 06, 2012 8:49 pm
by Presto-X
yup in Joomla 1.5.x you did not need quotes around the text so it would look like:

Code: Select all

LABEL NAME=Your Name
And in Joomla 1.6.x+ you needed to wrap the text in quotes like so:

Code: Select all

LABEL NAME="Your Name"
Correct?

I was unaware of
The file is not stored as UTF8 without BOM

Re: What are the common causes for language files not workin

Posted: Fri Apr 06, 2012 8:54 pm
by Per Yngve Berg
Space is not allowed 1.6+ use LABEL_NAME="Your Name"

Re: What are the common causes for language files not workin

Posted: Fri Apr 06, 2012 8:59 pm
by Presto-X
Per Yngve Berg wrote:Space is not allowed 1.6+ use LABEL_NAME="Your Name"
that's good to know to, I did test it by renaming the labels with underscores and then also added the component name at the start like so:

Code: Select all

COM_MYCOM_LABEL_NAME="Your Name"
That did not fix it ether, I will give the UTF8 thing a shot.

Re: What are the common causes for language files not workin

Posted: Fri Apr 06, 2012 9:02 pm
by Per Yngve Berg
Have you enabled Debug and Language Debug on the site?

Re: What are the common causes for language files not workin

Posted: Fri Apr 06, 2012 9:37 pm
by Presto-X
Ok so I turned on the language debug, and made sure that all of the language file spaces where removed from the labels and it seems to work now, that's good to know.

Code: Select all

COM_YOURCOMPONENT_LABEL_NAME="Your Name"
Thanks for the help Per Yngve Berg