Fleximodule and default langauge

More
12 years 8 months ago #17652 by mazataza
thanks for your quick replays
it work well with your code.

i have modified it a lit to get it working
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 ' . $db->Quote( $lang .'%' ); } else { // Items of any language }

i just replaced $this->_db->Quote with $db->Quote.

the result of SELECT * FROM `jos_languages` ist


Name active iso code shortcode
English 1 en_GB.utf8, en_GB.UT en-GB en
Arabic 1 ar_SA.utf8, ar_SA.UT ar-SA ar

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

More
12 years 8 months ago #17657 by ggppdk
The second part 'SA' of "ar-SA" seems to be different for joomla language and flexicontent items. In future i will use only first part 'ar' to determine language ...

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 #17660 by mazataza
I have a strange behaviour in langauge.

I set the default langauge for front site in joomla to arabic and i see it also as default in the admin. but it time i clear the cookies in firefox the default lang is set to en-GE, but i don'T see this issue on IE9.

do someone have an idea?

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

More
12 years 8 months ago #17663 by ggppdk
Browser is setting language to Arabic but with different country code than your site has.

To something like ar-CC where first part 'ar' is language and second part 'CC' is the country.

I don't know match more about it. You can read more here:
www.w3.org/International/questions/qa-lang-
priorities


-- 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 #17674 by mazataza
the solution is in the system plugin jfroute.
i can set various configuration for handling default langauge.

thanks

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

More
12 years 8 months ago #17676 by ggppdk
Ok, but just to be more compatible (flexicontent module) i committed the alternative way of getting language in 1.5.6 beta

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.293 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