Jump to content

Multiple languages displayed on the same page


strandoo
 Share

Recommended Posts

Hello all. I'm planning a site that will include 5 languages. Processwire looks perfect for this. From what I can tell, the 'normal' behaviour is to have different urls for each language. But rather than having 5 parallel 'sites', each with a different language, my client needs to have each of the 5 languages displayed on the same page.

The site is mostly in english, but news posts will be multi-lingual and appear together on one page, one after another. Is this possible? Does anyone have any suggestions for the best way to achieve this? Thanks in advance.

Link to comment
Share on other sites

You can get language value for each language field by using  $page->getLanguageValue(language, field);

foreach($languages as $language) echo $language->name, " : " , $page->getLanguageValue($language, 'title') , "<br/>"

 

  • Like 1
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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