news deatail missing language settings

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
mox
Forum Members
Forum Members
Posts: 113
Joined: Wed Feb 08, 2006 2:32 pm

news deatail missing language settings

Post by mox »

Hi,
I don't know how change the default language for the detail template of the news

date, print, return I need in italian

I put the code in the page:

{cms_module module="news" category="notizie" moretext="..." dateformat="%d %b, %Y" summarytemplate="dem_somm.tpl" detailtemplate="dem_dett.tpl" lang="it_IT"}

the lang="it_IT" parameter  it seems not to work

There is a trick?

Thanks
mox
kannibal

Re: news deatail missing language settings

Post by kannibal »

dosnt work for me eather..

it seems to be something wrong with /lib/classes/class.module.inc.php

i tried to print the dir where it trying to load the language on line 2613 in class.module.inc.php right after $ourlang = $this->curlang;

print "$dir/modules/".$this->GetName()."/lang/$ourlang/$ourlang.php
";

result: /modules/News/lang//.php

when changing
$ourlang = $this->curlang;

to

$ourlang = "sv_SE";

it works. but i gues this is not the right way to do




so what im trying do do is to find out why both of this is empty: $gCms->current_language and $this->curlang
line: 2608
if ($this->curlang == '' && isset($gCms->current_language))
{
$this->curlang = $gCms->current_language;
}

that i didnt find out, anyone else know why?

sorry for my english, thats not my native language =)
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

Re: news deatail missing language settings

Post by tsw »

works here on current svn. BUT strings "category:" and "posted by:" are in the template and thus will not be changed (more link does change)

Ill see what I can do for 1.0.2
WebPiet
Forum Members
Forum Members
Posts: 29
Joined: Thu Sep 21, 2006 7:18 pm

Re: news deatail missing language settings

Post by WebPiet »

tsw wrote: works here on current svn. BUT strings "category:" and "posted by:" are in the template and thus will not be changed (more link does change)

Ill see what I can do for 1.0.2
I just installed my site with 1.0.2.  The language file "nl_NL" works fine, but the strings "category" and "posted by" remain in English.  Ain't there really no workaround?

Piet.
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm

Re: news deatail missing language settings

Post by Dee »

WebPiet wrote: Ain't there really no workaround?
Sure... just edit action.default.php... or use the latest version of action.default.php from SVN.
In the latter case you'll need to add $lang['category_label'] and $lang['author_label'] to your lang files.
For English you can download the latest language file, for dutch you'll have to add it to lang/ext/nl_NL.php yourself:

Code: Select all

$lang['category_label'] = 'Categorie:';
$lang['author_label'] = 'Afzender:';
Gr,
D
Last edited by Anonymous on Wed Oct 25, 2006 11:41 pm, edited 1 time in total.
WebPiet
Forum Members
Forum Members
Posts: 29
Joined: Thu Sep 21, 2006 7:18 pm

Re: news deatail missing language settings

Post by WebPiet »

That's what i needed. Thanks. It will be my first additions to a lang-file; is it equal where I put the 2 extra "$ lang" lines in the file or are there rules for it?

Piet.
GDS
Forum Members
Forum Members
Posts: 81
Joined: Sun Feb 18, 2007 1:26 pm

Re: news deatail missing language settings

Post by GDS »

I found the bug!  :)


Look in the file News/action.default.php
The lines 189 to 193:

if (isset($params['lang']))
{
$sendtodetail['lang'] = $params['lang'];
$sendtoprint['lang'] = $params['lang'];
}

should be moved to line line 183,
before the line starting with #CreateLink($id, $action, ... etc


GDS
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm

Re: news deatail missing language settings

Post by Dee »

GDS wrote: I found the bug!  :)
Fixed in SVN.
Thanks for spotting!

Regards,
D
Post Reply

Return to “CMSMS Core”