(2013-05-05, 03:11:15)Kida Wrote: because I need a function, that returns the content to me and not prints it out directly
I guess, I'll have to try writing my own return_i18n_content or sth...
... okay, done. that was quite simple actually now I have a return_i18n_content
You can use the following to return the pages's XML and get the content using a $slug without language:
Code:
$xml = I18nFrontend::getPageData($slug);
$content = stripslashes(htmlspecialchars_decode($xml->content, ENT_QUOTES));
(2013-05-05, 12:12:16)yojoe Wrote:Code:find_i18n_url('samplepage',$language);
The second parameter should be the parent or null. In your case it outputs the current language and the parent (both 'en').
(2013-05-05, 12:12:16)yojoe Wrote: 2. I wanted to get a standalone link to parent (in respective language), and show it on all its slugs.
Is there maybe a builtin' function for this, rather than using below sample code ?
Code:$bc = return_i18n_breadcrumbs(return_page_slug());
echo '<a href="'.find_i18n_url($bc[0]['url'],$language)">'.$bc[0]['menu'].'</a></li>';
Your code gives a link to top-most ancestor (if you are on third level or below) - and the second parameter to find_i18n_url is wrong again. In general you don't need to specify the language, if it should not change.
To get a link to the parent, you can also use
Code:
get_i18n_link(get_parent(false));