Page 1 of 1
					
				[SOLVED] NEWS - Translation not showing in Detail Template
				Posted: Thu May 10, 2012 5:36 am
				by georgechr
				Hey everyone,
I am facing a strange problem.
I have set up a new "summary template" and a new "detail template" for my news list and currently i am using the default ones.
I have created my code like below:
Code: Select all
{news category="Greek*" number="5" sortby="news_date" summarytemplate="news" detailtemplate="news" lang="el_GR"}
The above code is displayed fine with its Greek translation in the summary template. Now though when i click on the title to view an article, the detail template ignores my language settings and show me items in Englishh (return link, category label etc). 
I checked the lang file of el_GR and its fine. The translations are there, i compared with the en_US one. I tried making changes to it, and saw that the changes are applied when in summary template whereas ignored in detail template.
How can i fix this? 
Thanks in advance
 
			
					
				Re: NEWS - Translation not showing in Detail Template
				Posted: Fri May 11, 2012 5:55 am
				by georgechr
				can someone share any insight on this?
			 
			
					
				Re: NEWS - Translation not showing in Detail Template
				Posted: Fri May 11, 2012 4:33 pm
				by Dr.CSS
				Do you have front end language set to greek?...
			 
			
					
				Re: NEWS - Translation not showing in Detail Template
				Posted: Mon May 14, 2012 5:57 am
				by georgechr
				no, but i don't want to set it, because if i do, my English news manager shows in Greek. I have a site with two languages.
In  my understanding when entering the "lang" parameter in the tags its enough.
			 
			
					
				Re: NEWS - Translation not showing in Detail Template
				Posted: Thu May 17, 2012 5:27 am
				by georgechr
				Anyone guys?
			 
			
					
				Re: NEWS - Translation not showing in Detail Template
				Posted: Thu May 17, 2012 6:12 am
				by vilkis
				Do you use pretty url?
vilkis
			 
			
					
				Re: NEWS - Translation not showing in Detail Template
				Posted: Mon May 21, 2012 6:02 am
				by georgechr
				yes i do, does this play any role?
			 
			
					
				Re: NEWS - Translation not showing in Detail Template
				Posted: Mon May 21, 2012 6:39 am
				by vilkis
				Yes, because lang parameter is not passed to detail template in pretty url mode. You can use smarty replace. For return link:
Code: Select all
{$return_url|replace:'return':'RETURN_IN_GREEK'}
vilkis
 
			
					
				Re: NEWS - Translation not showing in Detail Template
				Posted: Mon May 21, 2012 9:11 am
				by georgechr
				Thanks for the help. 
btw i tried to change
Code: Select all
{if $return_url != ""}
<div id="NewsPostDetailReturnLink">{$return_url}{if $category_name != ''} - {$category_link}{/if}</div>
{/if}
to
Code: Select all
{if $return_url != ""}
<div id="NewsPostDetailReturnLink">{$return_url|replace:'return':'Επιστροφή'}{if $category_name != ''} - {$category_link}{/if}</div>
{/if}
but it doenst work, still english.
I have the same problem with other fields. For example when showing category name in summary view is displayed fine, but when going to detail template it changes to English.
I am guessing the solution would be to change:
Code: Select all
{$category_label} {$entry->category}
to
Code: Select all
{$category_label|category:'category':'GREEK NAME'} {$entry->category}
?
 
			
					
				Re: NEWS - Translation not showing in Detail Template
				Posted: Mon May 21, 2012 10:23 am
				by vilkis
				georgechr wrote:Thanks for the help. 
Code: Select all
{if $return_url != ""}
<div id="NewsPostDetailReturnLink">{$return_url|replace:'return':'Επιστροφή'}{if $category_name != ''} - {$category_link}{/if}</div>
{/if}
 
What is text in your return link?
Probably your return link is "Return" (first capital letter).
vilkis
 
			
					
				Re: NEWS - Translation not showing in Detail Template
				Posted: Mon May 21, 2012 11:10 am
				by georgechr
				Yes its "Return"
			 
			
					
				Re: NEWS - Translation not showing in Detail Template
				Posted: Mon May 21, 2012 11:15 am
				by vilkis
				So 
Code: Select all
{$return_url|replace:'Return':'Επιστροφή'}
should work.
vilkis
 
			
					
				Re: NEWS - Translation not showing in Detail Template
				Posted: Mon May 21, 2012 11:33 am
				by georgechr
				sorry! did not see the capital letter remark. Thanks it works.
Can i do it for others as well like i mentioned above?
			 
			
					
				Re: NEWS - Translation not showing in Detail Template
				Posted: Mon May 21, 2012 11:39 am
				by vilkis
				Try and you'll see. 
 
 
vilkis
 
			
					
				[SOLVED] Re: NEWS - Translation not showing in Detail Templa
				Posted: Mon May 21, 2012 11:42 am
				by georgechr
				Ok thanks, i am just unsure for the label part.
Anyhow, thanks for your great and prompt help. Cheers