[TYPO3-mvc] How to deal with complicated translation/language requirements "the extbase way"?
Andreas Kießling
andreas.kiessling at web.de
Sun Dec 20 21:11:37 CET 2009
Hi,
i am planning to use extbase for a rather complicated project with a lot
of different languages. extbase and fluid will surely help to provide a
neat and clean structure for the project, but i fear, that i will have
write a lot of sql statements...
I found some places where the statements are prepared with
getRespectEnableFields / addEnableFieldsStatement and finally
doLanguageAndWorkspaceOverlay get's called, but this won't be sufficient
for the project.
Let me give you an example:
I have a table with products. All products are in one sysfolder and get
translated, if they are available in a different language.
sys_language_overlay is usually set to hideNonTranslated.
What if a product is not available in the default language? I sometimes
work around that problem with multiple sysfolders and create records
only in the language that i need, but if the product is available in 2
or more other languages, i like to create a hidden record in default
language and translate that record so the backend is as simple and clean
as possible for all users. For the frontend rendering of the non default
languages, all records with sys_language_uid = 0 are fetched, even if
they are hidden (cObj->enableFields with showHidden setting turned on),
so the translated records can be fetched with getRecordOverlay.
How do you deal with this problem?
I often thought about using the default language only as a way to group
all translation, but not to render it in the frontend. So the default
record can stay visible, and the overlays can be created and/or hidden
as needed, l10n_mode can be set to exclude, etc. . This on the other
hand might produce heavy load on the database, because every record is
fetched and checked for translation. Also, the clients do not
understand, why they can't use the default language and need to create
all records at least twice.
Regards,
Andreas
More information about the TYPO3-project-typo3v4mvc
mailing list