Localization does not work with albums (file collections)

Issue #68 open
Wolfgang Klinger created an issue

TYPO3 10, Extension version 2.2.0

Everything worked before an upgrade from 8 to 10.
I have a site with 2 languages and a list of file collections I want to show as galleries.

It works in the default language, but the translated page shows only ‘No albums found’.

So I thought I have to translate the file collections. If I do that, I always get the same translated file collection as album twice on the default and the translated page and always with the translated title. Totally weird.

Here’s a screenshot of the default language view (though the album shows text from the file collection’s translation)

and here’s the translated page (that even shows a different thumbnail for the album):

Comments (6)

  1. Frans Saris repo owner

    @Wolfgang Klinger can it be that during the upgrade of TYPO3 the sys_file_collection records got language default instead of all? Can you add a screenshot of the file collections in the backend with Localization column visible?

  2. Patrik Barilar

    hy,
    I solved the problem.
    I removed the row in the repository - MediaAlbumRepository.php .
    $query->getQuerySettings()->setRespectSysLanguage(false);

    Records are displayed correctly on different language versions of the website.

  3. Thomas Hezel

    version 3.03 same thing localisation is not working as expected.

    just adding a “de.locallang.xlf” is not working.

    Via TypoScript:

    example:

    plugin.tx_fsmediagallery._LOCAL_LANG.de.back_to_album = « Zurück zur Jahresübersicht
    plugin.tx_fsmediagallery._LOCAL_LANG.de.back_to_%s = « Zurück zu den Alben
    

    first line works second not

    Please also check template “NestedList.htm” line 56:

    “back_to_%s” is not giving a “title” of {parentAlbum.title} it is always NULL while {parentAlbum} is a valid object and has a “title” but “protected”

    Workaround:

    Creating an “AdditionalConfiguration.php” file in the TYPO3 installation also works with the de.locallang.xlf in a sitepackage to translate but the variable “%s” in the translation viewhelper is still not working.

    Inside “typo3conf” : “AdditionalConfiguration.php”

    $GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride']['EXT:fs_media_gallery/Resources/Private/Language/locallang.xlf'][] = 'EXT:sitepackagepackage/Resources/Private/Extensions/fs_media_gallery/Language/locallang.xlf';
    $GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride']['de']['EXT:fs_media_gallery/Resources/Private/Language/locallang.xlf'][] = 'EXT:sitepackage/Resources/Private/Extensions/fs_media_gallery/Language/de.locallang.xlf';
    

    Hope this helps to give some hints for bug fixing and workarounds for users

    Overwise I like the extension!

    What is missing is to put “data-lightbox” or “data-fancybox='gallery'” in the images link via settings to use e. g. fancybox or the TYPO3 fancybox extension. But one can put it in the fluid template hard coded. Plugin-Settings would be more elegant since css and rel can be set.

    THX

    Thomas

  4. Log in to comment