Keyword

K2ModelItemlist error way to take the default language on prepareSearch method

  • Luca Scarpa
  • Luca Scarpa's Avatar Topic Author
  • Offline
  • New Member
  • Luca Scarpa
More
14 years 2 months ago #85379 by Luca Scarpa
Hi, I have a problem with custom search of K2, it considers the default language for contents always en-GB also if I have set it-IT as default language for my site.I have seen the code and I found that k2 on prepareSearch method of K2ModelItemlist class take the default language from JLanguage attribute:$language = &JFactory::getLanguage();$defaultLang = $language->getDefault();I think that it will be better if it take the default language of site from com_languages parameters, so it is the same that the user has set:$params = JComponentHelper::getParams('com_languages');$defaultLang = $params->get("site", 'en-GB');Making these changes in my site I have that if I set Italian as default language for the site I have results in italian also if I haven't added them in joom!Fish. Before these changes I didn't get any results if no translations were made in Joom!Fish.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum