Page 1 of 1

multilingual-plugin: Showing only Entrys in selected lang

Posted: Mon Aug 13, 2007 3:32 pm
by PierreW
Hello,

actually i'm working in trying to get the multilingual-Plugin only showing entrys that are translated in english when english language is selected (so hiding those, that are not translated).
I could just filter in the event-file those entrys that are avaible in english, but that would show on a 10 entrys page with maybe 5 translated only those 5 on the index page..

Any suggestions?

Thanks in advance!
- PierreW

Re: multilingual-plugin: Showing only Entrys in selected lan

Posted: Mon Aug 13, 2007 3:57 pm
by garvinhicking
Hi!

Yeah, that's a shortcoming that I don't think is fixable.

Have you tried about setting up categories? You can create categories for english, french etc. and then you can assign those multilingual entries to the specific category, and then you only see entries in the category view for that language...

Best regards,
Garvin

Posted: Mon Aug 13, 2007 4:49 pm
by PierreW
I've found a solution on that problem - i guess it's not intended by the module creator, but it works fine for us.

In the frontend_fetchentry-hook i just modified

Code: Select all

                    if (!empty($this->lang_display)) {
                        // If lang_display is set - we want ONLY the entries which have translation
                        $eventData['and'] .= " AND multilingual_body.value IS NOT NULL";
                    }
with

Code: Select all

                    if ($this->showlang == "en") {
                        // If lang_display is set - we want ONLY the entries which have translation
                        $eventData['and'] .= " AND multilingual_body.value IS NOT NULL";
                    }
Fine enough for us just wanting to make a difference between german and english.

Posted: Mon Aug 13, 2007 9:11 pm
by garvinhicking
Hi!

Oh, okay. I didn't know it was that easy. Good job! :)

Regards,
Garvin