UDT referring to lang file?

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
jmansa
Forum Members
Forum Members
Posts: 126
Joined: Thu Oct 19, 2006 2:46 pm

UDT referring to lang file?

Post 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:

Code: Select all

--Add Me - clubadmin --
What language file should I use, and how do I link to it?
nuno

Re: UDT referring to lang file?

Post by nuno »

I
if you use  lang EN put in en_US.php


$lang['clubadmin'] = 'your text.';

sorry my bad english
Last edited by nuno on Wed Sep 19, 2007 3:13 pm, edited 1 time in total.
jmansa
Forum Members
Forum Members
Posts: 126
Joined: Thu Oct 19, 2006 2:46 pm

Re: UDT referring to lang file?

Post 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?
nuno

Re: UDT referring to lang file?

Post 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
Last edited by nuno on Wed Sep 19, 2007 3:55 pm, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: UDT referring to lang file?

Post 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.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
nuno

Re: UDT referring to lang file?

Post by nuno »

hello calguy1000

sorry what is UDT's?


but in general and normal terms he is as I explained? Correct??
Last edited by nuno on Wed Sep 19, 2007 4:02 pm, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: UDT referring to lang file?

Post 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. 
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
nuno

Re: UDT referring to lang file?

Post by nuno »

thanks,you si my PM
Post Reply

Return to “CMSMS Core”