Fleximodule and default langauge

More
12 years 8 months ago #17562 by mazataza
I have define arabic as default langauge for the front site. and when i have fleximodule which shows only items of the current langauge, there is no result is showed. but as i call the site like

/index.php/ar

it shows results.
this I could understands why. I set my arabic as default language in joomla langauge manager.

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

More
12 years 8 months ago #17564 by ggppdk
Which Flexicontent version are you using? and you have original mod_flexicontent of your version or replaced by files you found in this forum? (the latest Flexicontent module for 1.5.6, posted in some topics in this forum has "Current language scope")

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
12 years 8 months ago #17587 by mazataza
I am using flexicontent 1.5.6 from SVN and the fleximodule from svn, no code from forum.

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

More
12 years 8 months ago #17591 by ggppdk
Do this test:
Open file modules/mod_flexicontent/helper.php
Add at about line 474 replace code:
Code:
$language =& JFactory::getLanguage(); $currlangcode = $language->_lang; if ($method_curlang == 1) { // exclude method --- exclude items of current language $where .= ' AND ie.language <> ' . $currlangcode; } else if ($method_curlang == 2) { // include method --- include items of current language ONLY $where .= ' AND ie.language = "' . $currlangcode.'"'; } else { // Items of any language }
with
Code:
$lang = JRequest::getWord('lang', '' ); if(empty($lang)){ $langFactory= JFactory::getLanguage(); $tagLang = $langFactory->getTag(); //Well, the substr is not even required as flexi saves the Joomla language tag... so we could have kept the $tagLang tag variable directly. $lang = substr($tagLang ,0,2); } if ($method_curlang == 1) { // exclude method --- exclude items of current language //$where .= ' AND ie.language <> ' . $currlangcode; } else if ($method_curlang == 2) { // include method --- include items of current language ONLY $where .= ' AND ie.language LIKE ' . $this->_db->Quote( $lang .'%' ); } else { // Items of any language }

also on the new code, temporary change line:
$tagLang = $langFactory->getTag();
to
echo $tagLang = $langFactory->getTag();

What is the output?

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
12 years 8 months ago #17596 by ggppdk
Also note that if your translate your items (their title and description) using Joomfish you must not use "current language scope".

Only use this scope if you have various languages for your items inside the items manager. I mean you have some items English and some Arabic.

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
12 years 8 months ago #17644 by ggppdk
Also please execute this in phpmyadmin and post the result here:
Code:
SELECT * FROM `jos_languages`

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.298 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline