Jump to content

Recommended Posts

Posted

I would like to be able to fetch the labels for fields in a language different than the current logged in user.

For field values that's easy 

// p is page, l is language, and f is field
$p->getLanguageValue($l, $f);

I'm looking for something like

$fields->getLanguageValue('en', 'length');

The only solution I know of is to save the current user language, iterate through the languages by setting the user language and fetching the value, and then restore the user language.

 

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
×
×
  • Create New...