[TYPO3-core] Translating file reference

Frans Saris franssaris at gmail.com
Mon Jan 20 19:52:32 CET 2014


Hi Stefan,

when you create a translation of your own model/record then you should also
be able to add a translated version of the filereference.

For a working example you can look at the current master branch of ext:news.

gr. Frans


2014/1/14 Stefan Terborg <terborg at simplethings.de>

>  Hi Frans,
>
>
>
> my TCA:
>
>>
> 'download' => array(
>
>             'exclude' => 0,
>
>             'label' =>
> 'LLL:EXT:st_kandocs/Resources/Private/Language/locallang_db.xlf:tx_st_domain_model_base.download',
>
>             'config' =>
> \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
>
>                 'download',
>
>                 array(
>
>                     'maxitems' => 1,
>
>                     'minitems' => 0,
>
>                     'allowed' => '',
>
>                     'disallowed' => 'php',
>
>                     'size' => 1,
>
>                 )
>
>             ),
>
>         ),
>
>>
>
>
> My Model:
>
>>
> /**
>
> * download
>
> *
>
> * @var \TYPO3\CMS\Extbase\Domain\Model\FileReference
>
> */
>
> protected $download;
>
>>
>
>
> My Fluid template:
>
>>
> <a href="fileadmin/{base.download.originalResource.properties.identifier}"
> title="{base.download.originalResource.properties.title}">
>
>>
>
>
>
>
> Regards
>
> Stefan
>
>
>
> *Von:* typo3-team-core-bounces at lists.typo3.org [mailto:
> typo3-team-core-bounces at lists.typo3.org] *Im Auftrag von *Frans Saris
> *Gesendet:* Montag, 13. Januar 2014 20:59
>
> *An:* TYPO3 core team
> *Betreff:* Re: [TYPO3-core] Translating file reference
>
>
>
> How does your TCA look like? The whole translation part is configured in
> TCA.
>
> http://docs.typo3.org/typo3cms/TCAReference/Reference/Columns/Index.html
>  l10n_mode
>
>
>
> gr. Frans
>
>
>
>
>
>
>
> 2014/1/13 Stefan Terborg <terborg at simplethings.de>
>
>  Hi Frans,
>
>
>
> in this case, how do I access the translated file_reference in Fluid
> template? Do I have to change the model or the TCA?
>
>
>
> Regards
>
> Stefan
>
>
>
> *Von:* typo3-team-core-bounces at lists.typo3.org [mailto:
> typo3-team-core-bounces at lists.typo3.org] *Im Auftrag von *Frans Saris
> *Gesendet:* Montag, 13. Januar 2014 18:00
> *An:* TYPO3 core team
> *Betreff:* Re: [TYPO3-core] Translating file reference
>
>
>
> Hi Stefan,
>
> If you want to use a different file for each language (sys_language_id)
> you should create a different file reference for each language.
>
> So create for every translation of your object a unique file reverence.
>
> Gr. Frans
>
> Op 13 jan. 2014 09:54 schreef "Stefan Terborg" <terborg at simplethings.de>:
>
>  Hi,
>
>
>
> 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?
>
>
>
> Regards,
>
> Stefan
>
>
>
>
>
> _______________________________________________
> Before posting to this list, please have a look to the posting rules
> on the following websites:
>
> http://typo3.org/teams/core/core-mailinglist-rules/
> http://typo3.org/development/bug-fixing/diff-and-patch/
> _______________________________________________
> TYPO3-team-core mailing list
> TYPO3-team-core at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-team-core
>
>
> _______________________________________________
> Before posting to this list, please have a look to the posting rules
> on the following websites:
>
> http://typo3.org/teams/core/core-mailinglist-rules/
> http://typo3.org/development/bug-fixing/diff-and-patch/
> _______________________________________________
> TYPO3-team-core mailing list
> TYPO3-team-core at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-team-core
>
>
>
> _______________________________________________
> Before posting to this list, please have a look to the posting rules
> on the following websites:
>
> http://typo3.org/teams/core/core-mailinglist-rules/
> http://typo3.org/development/bug-fixing/diff-and-patch/
> _______________________________________________
> TYPO3-team-core mailing list
> TYPO3-team-core at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-team-core
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20140120/c70649fa/attachment-0001.htm>


More information about the TYPO3-team-core mailing list