strange JText::sprintf Behaviour

Have a programming question regarding your component, plug-in, extension or core hacks? Have an interesting tidbit, FAQ or programming tip you’d like to share? This is the place for you.

Moderators: tjay, seadap, Rogue4ngel, matthewhayashida

Post Reply
pAnd0rA
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu May 18, 2006 9:54 pm

strange JText::sprintf Behaviour

Post by pAnd0rA » Thu Feb 21, 2008 12:39 am

Hi!

While adapting a Module to J!1.5 I came across something reallly strange...
When I publish the Module to the Top-Position of the Template, <?php echo JText::sprintf( 'HINAME', $user->get('name') ); ?> works fine and outputs "Hello Administrator,", but when I publish it further down the Page (i.E. right column), the same function just outputs "HINAME" ???
I tried it on different Templates, different Module-Positions, tried stripping down the code to only <?php echo JText::sprintf( 'HINAME', $user->get('name') ); ?> etc.
Even when I copy the Module and place one in the Top-Position and another one in right, the one on Top will say "Hello Administrator,", while the other one says "HINAME", although it's exatly the same code :o

Please help!

pAnd0rA
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu May 18, 2006 9:54 pm

Re: strange JText::sprintf Behaviour

Post by pAnd0rA » Thu Feb 21, 2008 1:55 am

I found the Solution... while for the appearance in the Header-Location it used the original Login Module's Language-File it didn't do that later on...

Can somebody now tell me, how to make my Module use the <language/<language>.mod_login.ini as Language-File instead of searching for it's own one? ;)

Help is much appreciated! Thank you ;)


Post Reply