[TYPO3-mvc] Creating translated records with extbase

Nils Blattner nb at cabag.ch
Thu Jul 15 15:11:40 CEST 2010


Hi there

I am struggling with creating translated records at the moment:

The setting is a TYPO3 4.3 with extbase/fluid revision 2300 (2301 is 
dependant on 4.4). There are 3 languages configured, german, english and 
french.
The extension is similar to a guestbook, however, the idea is that 
records created in german are only displayed in german, english only in 
the english version etc.
Each post can have a category, which are maintaned in the backend and 
are translated.

For the german version this works like a charm (naturally).
However when I create a new record over the english version a record 
with sys_language_uid = 0 (german) is created aswell.
The category relation was (at least once) to a translated record which 
is rather bad.

So I've had a look around in the source/google and checked out how 
translations are handled.
I added a setter for sys_language_uid and set the property _languageUid 
with it aswell.
This works and creates a single record with the english language set.

However this record doesn't display in the corresponding list action.

I also tried to create 2 records, one with the default language that is 
hidden and the actual translated record with the parent uid etc set.

However in this scenario the result is even weirder:
As soon as I try to save the translated record, the original changes the 
sys_language_uid to say 2 and the new record is with NULL + empty values 
and sys_language_uid = -1 (all languages).

Am I doing something wrong or is extbase just incapable of creating 
translated records?

Regards,
Nils


More information about the TYPO3-project-typo3v4mvc mailing list