multilanguage sql

More
11 years 6 months ago #29868 by rottenberg
multilanguage sql was created by rottenberg
hello

I have created a select type field with SQL to get the distinct values of this field.

The values are title of article for a specific category.

here my slq sentence (which is working) :
Code:
SELECT `id` as value, `title` as text FROM `jos_content` WHERE `state` = 1 AND `catid` = 13 AND `publish_up` <= now() and (`publish_down` ='0000-00-00:00:00' or `publish_down` =now())

My site is english and french speaking. How can I add the current language in the SQL. I want to selct only french speaking articles when I am on french page and english article when I am on english speaking articles.

I have seen that in jos-content there is a field called language but I don't know how to give the current language in the select


thank you for help

best regards

Michel

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

More
11 years 6 months ago #29875 by ggppdk
Replied by ggppdk on topic multilanguage sql
I am just now finishing extensive changes for advanced search index / basic search index, which included unifying code for all indexable fields ... select, selectmultiple, radio, radioimage, checkbox, checkboximage,

for these the code for creating the values has been unified in a single function, you think to add more replacements to it (we already have replacements for item properties) ...

-- so i ll add a replacement for current language like: {curr_userlang_shorttag}

Thus you can add to your query: AND language LIKE '{curr_userlang_shorttag}%'

or for J2.5: AND language='{curr_userlang_fulltag}'


-- 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
11 years 6 months ago #29892 by rottenberg
Replied by rottenberg on topic multilanguage sql
thank you

I'm using Joomla 2.5.7 and FLEXIcontent version 2.0.0 RC9 (r1514)

Is the tag language='{curr_userlang_fulltag}' already available or will it only be available on next version ?

I have tried
Code:
SELECT `id` as value, `title` as text FROM `jos_content` WHERE `state` = 1 AND `catid` = 13 AND `publish_up` <= now() and (`publish_down` ='0000-00-00:00:00' or `publish_down` =now()) AND language='{curr_userlang_fulltag}'

but it doesn't work

best regards

Michel

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

More
11 years 6 months ago #29894 by ggppdk
Replied by ggppdk on topic multilanguage sql
no i said , i will add ...


-- 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
11 years 6 months ago #29898 by rottenberg
Replied by rottenberg on topic multilanguage sql
ok thank you !
do you have an estimated date for this new function ?

best regards
Michel

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

More
11 years 6 months ago #29900 by ggppdk
Replied by ggppdk on topic multilanguage sql
i have added added it already but, i am testing final changes for search feature


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