Jump to content

Multilanguage: different pages query based on language


Recommended Posts

Posted

I'm developing my first multilanguage website (italian and english).

Till this time everything is good, but I have only a problem.

I need to have "italian" courses and "international" courses that are totally different in content (so I don't need translation of the same page, but different records). I wanna show italian courses on italian website and international courses on english website.

I tried using standard (not multilanguage) fields and try to retrieve them in this way

if ($user->language == "1061") //check if set default language

{$items = $pages->find("parent=/courses/italiano/,limit=4");} //query for italian courses

else 

{$items = $pages->find("parent=courses/international/,limit=4");};//query for international courses

but this doesn't work, and no data show when I switch to english language.

Can you give some insights how to solve this problem and point me in the right direction?

Thank you!

Posted

Sorry but was only a problem related to the "active" checkbox of the language. Usually is active by default but  after importing from csv was not.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...