Page 1 of 1
UDT referring to lang file?
Posted: Wed Sep 19, 2007 12:03 pm
by jmansa
I have made a UDT and want some of the text inside it referr to a language file, but how???
I have tryid this:
Code: Select all
<td height="30" bgcolor="f5f5f5"><div align="center"><span class="style1">' .Lang ('clubadmin'). '</span></div></td>
But I only get this output:
What language file should I use, and how do I link to it?
Re: UDT referring to lang file?
Posted: Wed Sep 19, 2007 3:02 pm
by nuno
I
if you use lang EN put in en_US.php
$lang['clubadmin'] = 'your text.';
sorry my bad english
Re: UDT referring to lang file?
Posted: Wed Sep 19, 2007 3:29 pm
by jmansa
How should the tag I use in my UDT look like... $lang('clubadmin') or somethingh else... And what language does it referr to... Is it the one in admin?
Re: UDT referring to lang file?
Posted: Wed Sep 19, 2007 3:50 pm
by nuno
where tag uses this?
if it will be in one specify modulate then will be placed in lang of this modulate, if will be in adminpainel then will be in lang of admin
Re: UDT referring to lang file?
Posted: Wed Sep 19, 2007 3:55 pm
by calguy1000
UDT's do not natively support translation, you'd have to write functions for this and include them in the lib directory someplace.
If you're going to do that, you should just write a simple module. Modules do support translation.
Re: UDT referring to lang file?
Posted: Wed Sep 19, 2007 3:58 pm
by nuno
hello calguy1000
sorry what is UDT's?
but in general and normal terms he is as I explained? Correct??
Re: UDT referring to lang file?
Posted: Wed Sep 19, 2007 4:48 pm
by calguy1000
UDT's are simple chunks of php code that get stored in the database.
They're designed for doing simple things in php without having to ftp files up to your server, etc. They should not be used for complex tasks.
Re: UDT referring to lang file?
Posted: Wed Sep 19, 2007 5:08 pm
by nuno
thanks,you si my PM