[TYPO3-mvc] How to localize Extbase projects in cli mode

Dominik Stankowski dominik at web-essentials.asia
Mon Sep 19 18:25:34 CEST 2011


Hi everyone

It actually turns out that one can set $l18nParent in the Data Model by 
just adding this variable and a setter/getter function.

We first add the default language records, persist them, then add the 
non-default language records and set the $l18nParent with the uid of the 
original record.

To set the language uid, we use $_languageUid from the 
AbstractDomainObject with an own setter/getter function, as 
$sysLanguageUid does not seem to work.

Hope this helps.

Cheers,
Dominik

On 09/19/2011 10:28 PM, Dominik Stankowski wrote:
> Hi everyone
>
> By implementing setters and getters for _localizeUid in your model and
> applying the patch proposed in Bug #30041, the problem might be solved.
>
> I would love to have a bit a wider discussion here about how to localize
> objects in Extbase properly.
>
> Cheers,
> Dominik
>
> On 09/17/2011 05:54 PM, Dominik Stankowski wrote:
>> I was wondering if we can set-up the environment in a different language
>> and if that would localize the objects, but I cannot find any
>> information about how to do this.
>>
>> Any ideas?
>>
>> Cheers,
>> Dominik
>>
>> On 09/15/2011 10:22 PM, Dominik Stankowski wrote:
>>> Hi everyone
>>>
>>> We are using Extbase persistence to import data from an external
>>> database (cf. Zach's blog for a nice walk-through reference [1]).
>>>
>>> Extbase persistence is neat, because we work directly with the objects
>>> and do not need to worry if a newly imported database record was updated
>>> or added. It makes importer scripts extremely simple.
>>>
>>> But how should we proceed with multi-lingual records in cli mode? Is it
>>> possible to localize an Extbase object to another language (e.g.
>>> $modelObj->localize())?
>>>
>>> Or do we need to run the cli environment several times with different
>>> language settings (e.g. with a user with different user language)?
>>>
>>> Thank you in advance for any ideas.
>>>
>>> Cheers,
>>> Dominik
>>>
>>> [1]
>>> http://castironcoding.com/resources/our-blog/sp/view/single/post/reason-10-for-choosing-typo3-extbase-scheduler-win.html
>>>
>>>
>>>
>>
>



More information about the TYPO3-project-typo3v4mvc mailing list