<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tridion Developer &#187; Tridion news</title>
	<atom:link href="http://www.tridiondeveloper.com/category/news/feed" rel="self" type="application/rss+xml" />
	<link>http://www.tridiondeveloper.com</link>
	<description>Tridion Development portfolio and blog</description>
	<lastBuildDate>Thu, 26 Jan 2012 05:44:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Creating translatable website labels in SDL Tridion</title>
		<link>http://www.tridiondeveloper.com/creating-translatable-website-labels-in-sdl-tridion</link>
		<comments>http://www.tridiondeveloper.com/creating-translatable-website-labels-in-sdl-tridion#comments</comments>
		<pubDate>Sat, 20 Aug 2011 21:20:28 +0000</pubDate>
		<dc:creator>John Winter</dc:creator>
				<category><![CDATA[Tridion news]]></category>

		<guid isPermaLink="false">http://www.tridiondeveloper.com/?p=180</guid>
		<description><![CDATA[What&#8217;s a &#8216;translatable label&#8217;? A translation label is typically a short descriptive piece of text that is used in multiple places within a website (often every single page), for example &#8216;Print&#8217;, &#8216;Back&#8217; and &#8216;Send to friend&#8217;.  In the image below I&#8217;ve highlighted (in red) some text labels found in the header of an example website. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>What&#8217;s a &#8216;translatable label&#8217;?</strong></p>
<p>A translation label is typically a short descriptive piece of text that is used in multiple places within a website (often every single page), for example &#8216;Print&#8217;, &#8216;Back&#8217; and &#8216;Send to friend&#8217;.  In the image below I&#8217;ve highlighted (in red) some text labels found in the header of an example website.</p>
<p><a href="http://www.tridiondeveloper.com/wp-content/uploads/2011/08/text-labels-in-website.png"><img class="alignnone size-full wp-image-182" title="Website example showing text labels" src="http://www.tridiondeveloper.com/wp-content/uploads/2011/08/text-labels-in-website.png" alt="" width="913" height="177" /></a></p>
<p>If you&#8217;re using SDL Tridion to create multi-language websites, these labels need to be available to content editors to add their own translations.</p>
<p><span id="more-180"></span></p>
<h2><strong>How to store translatable labels within SDL Tridion.</strong></h2>
<p>Perhaps it&#8217;s best to start by saying how<strong> not</strong> to store these items, as i&#8217;ve seen the following used in a few implementations:</p>
<ol>
<li>Hardcoded within templates  &#8211; If the labels are entered directly into the template this means the template requires some localization and modification, this is bad for 2 very important reasons:
<ol>
<li>The template is localized, so any changes made to the parent have to be manually integrated into the child</li>
<li>It&#8217;s impossible for non technical users to actually edit these files.</li>
</ol>
</li>
<li>Within standard content schemas &#8211; The required labels are added (and often duplicated) within the content schemas, this means that each time a user needs to translate a lable (e.g. &#8216;Read more&#8217;) this must be performed in every instance.</li>
</ol>
<p><strong>Translatable label schema</strong></p>
<p>OK, so a better solution to this is to create a new schema, that will contain all the labels you wish to translate:</p>
<p>I&#8217;ve named the schema &#8216;Translatable labels&#8217; and added the following 4 fields:</p>
<ul>
<li>home</li>
<li>print</li>
<li>search</li>
<li>copyright_notice</li>
</ul>
<p>Each field is a single text field that is mandatory.  In your schema you can add all the labels your website needs and if you need any in the future, simply add a new schema entry.</p>
<p><a href="http://www.tridiondeveloper.com/wp-content/uploads/2011/08/sdl-tridion-translation-schema.png"><img class="alignnone size-full wp-image-190" title="sdl tridion translation schema" src="http://www.tridiondeveloper.com/wp-content/uploads/2011/08/sdl-tridion-translation-schema.png" alt="" width="644" height="599" /></a></p>
<h2>Creating a master labels component</h2>
<p>In order to create a master component, simply create a new schema in the parent content publication, this ensures our child local websites are able to &#8216;see&#8217; therefore localize it.</p>
<p><strong>Sidenote:</strong> I like to create a &#8216;Global components&#8217; folder, where I typically store the components which website content that is used globally, examples would be the company address, website footer text etc.</p>
<p><a href="http://www.tridiondeveloper.com/wp-content/uploads/2011/08/sdl-tridion-translation-component.png"><img class="alignnone size-full wp-image-191" title="sdl-tridion-translation-component" src="http://www.tridiondeveloper.com/wp-content/uploads/2011/08/sdl-tridion-translation-component.png" alt="" width="512" height="482" /></a></p>
<h2>How to reference the Translatable labels component</h2>
<p>Before we dive into the code, we need to consider how our code will reference our translation labels component,  if we use the TCM id hard coded the following will happen:</p>
<ul>
<li>If the component is deleted and recreated, the TCM id is lost</li>
<li>If we move this code to another environment the TCM id will not be the same</li>
<li>When we use this code in our local publication, the TCM is not the same</li>
</ul>
<p>So in this example, I&#8217;ve created a new Metadata schema, that contains a component link field, which allows me to reference the translation label component, as I plan to associate this schema to the publication I&#8217;ve name the schema &#8216;<strong>Publication Metadata</strong>&#8216;</p>
<p><a href="http://www.tridiondeveloper.com/wp-content/uploads/2011/08/sdl-tridion-translation-meta-schema.png"><img class="alignnone size-full wp-image-194" title="sdl tridion translation meta schema" src="http://www.tridiondeveloper.com/wp-content/uploads/2011/08/sdl-tridion-translation-meta-schema.png" alt="" width="608" height="595" /></a></p>
<p><strong>Another sidenote:</strong> (I know another!) Whilst I think storing this item in the publication metadata is a good solution, be careful about throwing everything in a publication metadata schema as it can quickly become huge.   A neater solution is to seperate out the different meta types into their own components  for example &#8216;SEO details&#8217;, &#8216;Site components&#8217;, &#8216;Region and language settings&#8217; and embed those into a &#8216;Master&#8217; publication metadata schema.</p>
<p>Anyway, now that the schema is created, associate to the publication metadata and then link the translation label to it.</p>
<p><a href="http://www.tridiondeveloper.com/wp-content/uploads/2011/08/sdl-tridion-translation-meta-component.png"><img class="alignnone size-full wp-image-195" title="sdl-tridion-translation-meta-component" src="http://www.tridiondeveloper.com/wp-content/uploads/2011/08/sdl-tridion-translation-meta-component.png" alt="" width="532" height="91" /></a></p>
<h2>The code</h2>
<p>The code part is broken into two areas:</p>
<ul>
<li>A C# Template Building Block to get the component from the metadata and put it in the package.</li>
<li>Dreamweaver template (DWT) code to display the translation lable within your layout.</li>
</ul>
<p><strong>C# Template Building Block code :</strong></p>
<p>Create a new TBB in your .net project and use the following code to reference and put the translation component into the template builder package.</p>
<div class="syntaxhighlighter htmlscript">
<pre class="brush: jscript; title: ; notranslate">
&lt;pre&gt;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Tridion.Extensions.ContentManager.Templating;
using Tridion.ContentManager.Templating;
using Tridion.ContentManager.ContentManagement;
using Tridion.ContentManager.CommunicationManagement;
using Tridion.ContentManager.ContentManagement.Fields;

namespace Tridion.Templates.Library.Common
{
class AddTranslationLabelComponent : TemplateBase
{

public override void Transform(Engine engine, Package package)
{
this.Initialize(engine, package);

// get the publication object
Publication publication = this.GetPublication() as Publication;
ItemFields metaFields = new ItemFields(publication.Metadata, publication.MetadataSchema);

// 'translation_labels' below is the schema field name
ComponentLinkField complinkField = (ComponentLinkField)metaFields[&quot;translation_labels&quot;];

// Put the translate lables component into the package
package.PushItem(complinkField.Name, package.CreateTridionItem(ContentType.Component, complinkField.Value));

}

}
}
&lt;/pre&gt;
</pre>
</div>
<p><strong>Note:</strong> I&#8217;m using the <a title="SDL Tridion base project" href="http://www.sdltridionworld.com/community/extension_overview/templatingbase.aspx">Tridion base project</a> in this example, and of course i&#8217;m not doing any testing to see if the publication has any metadata, if the translation_labels field exists or if it contains a referenced component.  In production code, I would always test for these things.</p>
<p><strong>Dreamweaver DWT</strong></p>
<p>As the component is in the package, all we need to do is make a reference to the component and field name as it appears in the package</p>
<p><!-- TempalteBEginIf cond="translation_labels" --><br /> @@translation_labels.home@@<br /><!-- TemplateEndIf --></p>
<h2>Testing everything</h2>
<p>In order to check everything works add the C# TBB and the DWT to a page or component template and run it.</p>
<p>I&#8217;ve highlighted with red boxes the following in the Template builder:</p>
<ul>
<li>AddTRanslationLabelComponent &#8211; The TBB containing the C#</li>
<li>The translation_labels component added to the package</li>
<li>&#8216;Maison&#8217; &#8211; A localization of the word home (I know it should probably read &#8216;Accueil&#8217; <img src='http://www.tridiondeveloper.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> )</li>
</ul>
<p><a href="http://www.tridiondeveloper.com/wp-content/uploads/2011/08/sdl-tridion-translation-template-builder.png"><img class="alignnone size-full wp-image-196" title="sdl-tridion-translation-template-builder" src="http://www.tridiondeveloper.com/wp-content/uploads/2011/08/sdl-tridion-translation-template-builder.png" alt="" width="918" height="501" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tridiondeveloper.com/creating-translatable-website-labels-in-sdl-tridion/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Content Delivery API &#8211; GetTaxonomyComponentPresentations Bug</title>
		<link>http://www.tridiondeveloper.com/content-delivery-api-gettaxonomycomponentpresentations-bug</link>
		<comments>http://www.tridiondeveloper.com/content-delivery-api-gettaxonomycomponentpresentations-bug#comments</comments>
		<pubDate>Fri, 26 Feb 2010 18:44:44 +0000</pubDate>
		<dc:creator>John Winter</dc:creator>
				<category><![CDATA[Tridion news]]></category>
		<category><![CDATA[SDL WCMS Bugs]]></category>

		<guid isPermaLink="false">http://www.tridiondeveloper.com/?p=53</guid>
		<description><![CDATA[From this months SDL Tridion SDL WCMS newletter there is the following note concerning a bug in the Content Delivery API. A defect has been reported and validated in the SDL Tridion 2009 Content Delivery API &#8211; GetTaxonomyComponentPresentations’ The method &#8216;GetTaxonomyComponentPresentations&#8217; is returning DCPs from multiple publications – the method is intended to return DCPs [...]]]></description>
			<content:encoded><![CDATA[<p>From this months SDL Tridion SDL WCMS newletter there is the following note concerning a bug in the Content Delivery API.</p>
<p><span id="more-53"></span></p>
<blockquote>
<h2><strong>A defect has been reported and validated in the SDL Tridion 2009 Content Delivery API &#8211; GetTaxonomyComponentPresentations’</strong></h2>
<p>The method &#8216;GetTaxonomyComponentPresentations&#8217; is returning DCPs from multiple publications – the method is intended to return DCPs only from the same Publication the Taxonomy exists in. As a workaround, you may use a direct Broker Query to retrieve the components tagged with the keyword, then retrieve DCPs based on those components with ComponentPresentationFactory. A JSP sample is provided below.</p>
<blockquote><p>Query   brokerQuery = new Query();</p>
<p>Criteria   Criteria1 = new Criteria(</p>
<p>new TaxonomyKeywordCriteria(taxonomyURI, firstkeywordURI),</p>
<p>new TaxonomyKeywordCriteria(taxonomyURI, secondKeywordURI),</p>
<p>new ItemTypeCriteria(16),</p>
<p>new PublicationCriteria(44)</p>
<p>);</p>
<p>brokerQuery.setCriteria(Criteria1);</p>
<p>String[]   foundItems = brokerQuery.executeQuery();</p>
<p>/*   Retrieve componentpresentations */</p>
<p>ComponentPresentationFactory   &#8230;&#8230;</p></blockquote>
</blockquote>
<p>It&#8217;s a shame they have just released <a href="http://www.tridiondeveloper.com/sdl-releases-tridion-2009-service-pack-1">Service Pack 1 for WCMS 2009</a> as this would have been a nice issue to have resolved.  I wonder if this will be resolved in Service Pack 2, or added to WCMS 2010.</p>
<p>As always interested to know if anyone has other workarounds than the one above.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tridiondeveloper.com/content-delivery-api-gettaxonomycomponentpresentations-bug/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SDL Releases Tridion 2009 Service pack 1</title>
		<link>http://www.tridiondeveloper.com/sdl-releases-tridion-2009-service-pack-1</link>
		<comments>http://www.tridiondeveloper.com/sdl-releases-tridion-2009-service-pack-1#comments</comments>
		<pubDate>Fri, 26 Feb 2010 18:33:21 +0000</pubDate>
		<dc:creator>John Winter</dc:creator>
				<category><![CDATA[Tridion news]]></category>
		<category><![CDATA[SDL WCMS Releases]]></category>

		<guid isPermaLink="false">http://www.tridiondeveloper.com/?p=49</guid>
		<description><![CDATA[Just received some news that SDL have released the first service pack for version 2009 of their Web content management system (WCMS).  Full details after the jump. Releases and Hotfixes: SDL Tridion 2009 Service Pack 1 SDL Web Content Management Solutions has released Service Pack 1 of it&#8217;s flagship SDL Tridion 2009. Hotfixes Following hotfixes [...]]]></description>
			<content:encoded><![CDATA[<p>Just received some news that SDL have released the first service pack for version 2009 of their Web content management system (WCMS).  Full details after the jump.</p>
<p><span id="more-49"></span></p>
<blockquote>
<h1>Releases and Hotfixes:</h1>
<h2>SDL Tridion 2009 Service Pack 1</h2>
<p>SDL Web Content Management Solutions has released Service Pack 1 of it&#8217;s flagship SDL Tridion 2009.</p>
<h2>Hotfixes</h2>
<p>Following hotfixes have recently been made available.</p>
<p>SDL Tridion 2009 GA</p>
<ul>
<li style="margin-left: 15px;"><strong>CD_2009.0.66615</strong><br />
Generated Broker Queries are too slow when using multiple OR operations.</li>
</ul>
<p><strong>SiteEdit 2009 GA</strong></p>
<ul>
<li style="margin-left: 15px;"><strong>SE_2_1_0_67110</strong><br />
Each web site needs to be on a separate port, you cannot use only host names/host headers.</li>
</ul>
<p><strong>SiteEdit 1.3 Service Pack 1</strong></p>
<ul>
<li style="margin-left: 15px;"><strong>SE_1.3.2.66293</strong><br />
When publishing a page with SiteEdit in the page template (the page has no component) within Workflow from the work list. The page is published to the staging site successfully. When accessing the page using SiteEdit. The SiteEdit menu at the lower left corner only shows &#8220;User Work Items&#8221;, the other SiteEdit menu items seen in the Preview in Tridion GUI don&#8217;t show. The SiteEdit works fine in the Preview box in Tridion GUI.</li>
</ul>
<p><strong>SDL Tridion 5.3 Service Pack 1</strong></p>
<ul>
<li style="margin-left: 15px;"><strong>CM_5.3.1.66168</strong><br />
Unwanted tags are inserted when switching between the Source and Design tabs.</li>
<li style="margin-left: 15px;"><strong>CM_5.3.1.66777</strong><br />
When updating a &#8220;Publication Path&#8221; and &#8220;Publication URL&#8221;, the Directory location of the Structure Group contains 2 slashes instead of one.</li>
<li style="margin-left: 15px;"><strong>CM_5.3.1.67669</strong><br />
When publishing content, a large amount of database roundtrips can be measured on both an Oracle Database and SQL Server installations. The amount of database executes may likely cause a performance degradation.</li>
</ul>
<p><strong>SDL Tridion 5.3</strong> GA</p>
<ul>
<li style="margin-left: 15px;"><strong>CM_5.3.0.67972</strong><br />
When publishing an item, any un-publish settings specified by the user are stored. These stored settings are then re-applied the next time the Publish dialog is opened.</li>
</ul>
<p><strong>WebForms 2010 GA</strong></p>
<ul>
<li style="margin-left: 15px;"><strong>WF_2010.0.67795</strong><br />
Error &#8220;object required&#8221; occurs when trying to create a new Component in a folder which has a Linked Content Schema.</li>
<li style="margin-left: 15px;"><strong>WF_2010.0.67259</strong><br />
When .ASPX .NET WebForm is used and everything has been set to UTF-8 certain submitted characters (for example ö ä ä ) are not rendered correctly.</li>
</ul>
<p><strong>Outbound Email 2009 GA</strong></p>
<ul>
<li style="margin-left: 15px;"><strong>OE_2.0.0.67244</strong><br />
The logging on the Presentation server does not display sufficient information to debug synchronization issues, therefore making it extremely difficult or even impossible to troubleshoot.</li>
<li style="margin-left: 15px;"><strong>OE_2.0.0.65077</strong><br />
Closed statement exception thrown when synchronizing to a presentation side that uses an Oracle database to store the contact profiles.</li>
<li style="margin-left: 15px;"><strong>OE_2.0.0.64011</strong><br />
Bounce Processor service does not update Contact error status or Mailing statistics.</li>
<li style="margin-left: 15px;"><strong>OE_2.0.0.63942</strong><br />
Tracked Page link isn’t resolved when creating it using the Outbound E-mail Tracking system.</li>
</ul>
</blockquote>
<p>The release looks pretty standard and the fixes look pretty small.  That said the client I&#8217;m currently working for will not be releasing it any time in the near future so if anyone has installed it, i&#8217;d be interested to know how it went.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tridiondeveloper.com/sdl-releases-tridion-2009-service-pack-1/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

