Jump to content

Recommended Posts

Posted

Hey everyone,

I just entered the next stage of PW: multi language sites :)

Thanks to all who contributed to make this so(!) easy(!) with PW.

In many cases I found answers for every question so far, but one little piece is still missing:

In a template I want to access all translations from the description of an image. Whichever way I looked at it I only get the current translation which is selected for the user. 

Turn off output formatting and trying to access this via $page->myimage->first()->description_english did not work... :/

I am pretty sure that someone will have an answer for this. I really appreciate this :)

Thanks guys & cheers,

Chris

Posted

$german = $languages->get("german");

$germanDesc = $page->myimage->first()->description($german);

// returns a json string of all languages

$json = $page->myimage->first()->description(true);

  • Like 1

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