Page 1 of 1

module FriendlyName

Posted: Wed Oct 04, 2006 11:54 am
by nafise
Hi i use cmsms v1.2. when i use a non-english language, in moduleinterface, $themeObject->ShowHeader($gCms->modules[$module]['object']->GetFriendlyName())  returns --Add me -- translated name of module!!
i think this happen because GetFriendlyName() returns lang('modulename').and once again showheader function try to translate this translated text!! but i dont know how to solve it?

Re: module FriendlyName

Posted: Wed Oct 04, 2006 11:24 pm
by Dr.CSS
Are you telling the module or CMSMS to use non english lang.?

You may have to add the name of the module in the non engl. lang. file, find one of the existing $lang['admin']['CSS'] = 'CSS'; and alter it to include the module name translated... $lang['admin']['CSS'] = 'translation';

Re: module FriendlyName

Posted: Thu Oct 05, 2006 4:59 am
by nafise
Are you telling the module or CMSMS to use non english lang.?
actually both of them.

in the module folder i have a non-eng. lang. file(file 1), and i put the translation into it. and also in admin/lang/ext i have the related file(file 2).
ou may have to add the name of the module in the non engl. lang. file, find one of the existing $lang['admin']['CSS'] = 'CSS'; and alter it to include the module name translated...
do you mean (file2)?!!
even for news module i have -- Add me -- translation as the title!!

...and i notice another fact !!that is i've changed the Showheader function, today i roll back the modification and i find that there is no problem in the main code  :-[. here is my change :

Code: Select all

$title_name = lang($title_name, $extra_lang_param);
      	$cms = $this->cms;		
    	$config = $cms->GetConfig();             
        
      	$header  = '<div class="pageheader">';
      	$header .= '<center>';
        $header  .= '<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td width="0%">';
        $header  .= '<img border="0" height="22" src="themes/rdc/images/sl.gif" width="10"></img>';
        $header  .= '</td><td bgcolor="#CDE5FD" nowrap="" width="0%"><font color="#003366" face="Tahoma" size="1">';
        $header  .= $title_name;
        $header  .= '</font></td><td width="0%"><img border="0" height="22" src="themes/rdc/images/sr.gif" width="14"></img></td>';
        $header  .= '<td width="100%" bgcolor="white"></td></tr></table>';
        $header  .= '</center></div>';
        return $header;