svewap / ws_flexslider

Flexslider extension for TYPO3
7 stars 19 forks source link

Version 1.5.5 and more languages #29

Open Mezek opened 6 years ago

Mezek commented 6 years ago

Hi,

my webpage is configured in two languages:

  language = sk
  locale_all = sk_SK.utf8
  htmlTag_langKey = sk-SK
  linkVars = L
  sys_language_uid = 0
  sys_language_overlay = 1
  sys_language_mode = content_fallback;1,0

default is Slovak and second language for translation is English. I'm using also the extension sr_language_menu: plugin.tx_srlanguagemenu.defaultLanguageTitle = Slovak

I can change plugin Language to Slovak/English as for all content elements on webpages (first picture)

one

but when I try to set the language for specified image (second picture), the options differs from original one. There is Default instead of Slovak (default) two

I've done the translation of plugin to EN. The language of images I set in database to 0, but it didn't help. The plugin added a lot of images links without any effect.

Is it connected with the incompatibility of extensions or something else?

TigBay commented 6 years ago

Hi Mezek,

I also had this problem. Flexslider didn't function properly with content transladed into 5 languages. I mean that I always had languageFallback to the default language with id 0. In order to solve this bug I had to add a function getLocalizedUid to ContentModel:

class Content extends AbstractEntity
{

        /**
     * Returns the localized uid
     *
     * @return string $_localizedUid
     */
    public function getLocalizedUid() {
        return $this->_localizedUid;
    }

}

After that it was necessary to change the line 172 in file FlexsliderController.php (to adapt a parameter for findByContentUid function):

$this->view->assign('images', $this->imageRepository->findByContentUid($contentObject->getLocalizedUid()));
topsnet-holgerd commented 6 years ago

Hey TigBay,

I'm using typo3 7.6 and I found, that your changings only work with version 1.5.2. When I updated to version 1.5.3 or 1.5.4, the extension don't show the localized images as before without any changing to the extension code. Any idea, what should be changed additionally in version 1.5.3 resp. 1.5.4?

Max-LAB commented 6 years ago

@TigBay Your solution really helped me, I was strugling with this for two days, It wont work using sys_language_overlay = 0 and sys_language_mode = strict without your solution.