<div dir="ltr">Hi Stefan,<div><br></div><div>when you create a translation of your own model/record then you should also be able to add a translated version of the filereference.</div><div><br></div><div>For a working example you can look at the current master branch of ext:news.</div>
<div><br></div><div>gr. Frans</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014/1/14 Stefan Terborg <span dir="ltr"><<a href="mailto:terborg@simplethings.de" target="_blank">terborg@simplethings.de</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="DE" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi Frans,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">my TCA:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">…<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">'download' => array(<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> 'exclude' => 0,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> 'label' => 'LLL:EXT:st_kandocs/Resources/Private/Language/locallang_db.xlf:tx_st_domain_model_base.download',<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> 'download',<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> array(<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> 'maxitems' => 1,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> 'minitems' => 0,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> 'allowed' => '',<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> 'disallowed' => 'php',<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> 'size' => 1,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> )<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> ),
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> ),<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">…<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">My Model:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">…<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">/**<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">* download<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">*<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">* @var \TYPO3\CMS\Extbase\Domain\Model\FileReference<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">*/<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">protected $download;<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">…<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">My Fluid template:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">…<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><a href="fileadmin/{base.download.originalResource.properties.identifier}" title="{base.download.originalResource.properties.title}"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">…<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Regards<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Stefan</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Von:</span></b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <a href="mailto:typo3-team-core-bounces@lists.typo3.org" target="_blank">typo3-team-core-bounces@lists.typo3.org</a> [mailto:<a href="mailto:typo3-team-core-bounces@lists.typo3.org" target="_blank">typo3-team-core-bounces@lists.typo3.org</a>]
<b>Im Auftrag von </b>Frans Saris<br>
<b>Gesendet:</b> Montag, 13. Januar 2014 20:59</span></p><div class="im"><br>
<b>An:</b> TYPO3 core team<br>
<b>Betreff:</b> Re: [TYPO3-core] Translating file reference<u></u><u></u></div><p></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">How does your TCA look like? The whole translation part is configured in TCA.<u></u><u></u></p><div class="im">
<div>
<p class="MsoNormal"><a href="http://docs.typo3.org/typo3cms/TCAReference/Reference/Columns/Index.html" target="_blank">http://docs.typo3.org/typo3cms/TCAReference/Reference/Columns/Index.html</a> l10n_mode<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">gr. Frans<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
</div></div><div><div class="h5">
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p>
<div>
<p class="MsoNormal">2014/1/13 Stefan Terborg <<a href="mailto:terborg@simplethings.de" target="_blank">terborg@simplethings.de</a>><u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi Frans,</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">in this case, how do I access the translated file_reference in Fluid template? Do I have to change
the model or the TCA?</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Regards</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Stefan</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Von:</span></b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">
<a href="mailto:typo3-team-core-bounces@lists.typo3.org" target="_blank">typo3-team-core-bounces@lists.typo3.org</a> [mailto:<a href="mailto:typo3-team-core-bounces@lists.typo3.org" target="_blank">typo3-team-core-bounces@lists.typo3.org</a>]
<b>Im Auftrag von </b>Frans Saris<br>
<b>Gesendet:</b> Montag, 13. Januar 2014 18:00<br>
<b>An:</b> TYPO3 core team<br>
<b>Betreff:</b> Re: [TYPO3-core] Translating file reference</span><u></u><u></u></p>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
<p>Hi Stefan,<u></u><u></u></p>
<p>If you want to use a different file for each language (sys_language_id) you should create a different file reference for each language.<u></u><u></u></p>
<p>So create for every translation of your object a unique file reverence. <u></u><u></u></p>
<p>Gr. Frans<u></u><u></u></p>
</div>
<div>
<div>
<p class="MsoNormal">Op 13 jan. 2014 09:54 schreef "Stefan Terborg" <<a href="mailto:terborg@simplethings.de" target="_blank">terborg@simplethings.de</a>>:<u></u><u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal">Hi,<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">form y own extension I need a translateable file reference. I have created the extension with the extension builder, installed languages and so on. Everything works fine. But when
I create a translation of a file reference I face one problem: I can tranbslate the file meta data but not the file itself. Meaning: I can not change the german pdf to an english one. How is this supposed to work?<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Regards,<u></u><u></u></p>
<p class="MsoNormal">Stefan<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">_______________________________________________<br>
Before posting to this list, please have a look to the posting rules<br>
on the following websites:<br>
<br>
<a href="http://typo3.org/teams/core/core-mailinglist-rules/" target="_blank">http://typo3.org/teams/core/core-mailinglist-rules/</a><br>
<a href="http://typo3.org/development/bug-fixing/diff-and-patch/" target="_blank">http://typo3.org/development/bug-fixing/diff-and-patch/</a><br>
_______________________________________________<br>
TYPO3-team-core mailing list<br>
<a href="mailto:TYPO3-team-core@lists.typo3.org" target="_blank">TYPO3-team-core@lists.typo3.org</a><br>
<a href="http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-team-core" target="_blank">http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-team-core</a><u></u><u></u></p>
</div>
</blockquote>
</div>
</div>
</div>
<p class="MsoNormal"><br>
_______________________________________________<br>
Before posting to this list, please have a look to the posting rules<br>
on the following websites:<br>
<br>
<a href="http://typo3.org/teams/core/core-mailinglist-rules/" target="_blank">http://typo3.org/teams/core/core-mailinglist-rules/</a><br>
<a href="http://typo3.org/development/bug-fixing/diff-and-patch/" target="_blank">http://typo3.org/development/bug-fixing/diff-and-patch/</a><br>
_______________________________________________<br>
TYPO3-team-core mailing list<br>
<a href="mailto:TYPO3-team-core@lists.typo3.org" target="_blank">TYPO3-team-core@lists.typo3.org</a><br>
<a href="http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-team-core" target="_blank">http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-team-core</a><u></u><u></u></p>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div></div></div>
</div>
<br>_______________________________________________<br>
Before posting to this list, please have a look to the posting rules<br>
on the following websites:<br>
<br>
<a href="http://typo3.org/teams/core/core-mailinglist-rules/" target="_blank">http://typo3.org/teams/core/core-mailinglist-rules/</a><br>
<a href="http://typo3.org/development/bug-fixing/diff-and-patch/" target="_blank">http://typo3.org/development/bug-fixing/diff-and-patch/</a><br>
_______________________________________________<br>
TYPO3-team-core mailing list<br>
<a href="mailto:TYPO3-team-core@lists.typo3.org">TYPO3-team-core@lists.typo3.org</a><br>
<a href="http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-team-core" target="_blank">http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-team-core</a><br></blockquote></div><br></div>