I found a solution, realy dirty, but works.
In the core.php file of the polylang plugin I found this stuff:
// NOTE: I believe there are two ways for a plugin to force the WP language
// as done by xili_language and here: load text domains and reinitialize wp_locale with the action 'wp'
// as done by qtranslate: define the locale with the action 'plugins_loaded', but in this case, the language must be specified in the url.
function load_textdomains() {
// sets the current language
if (!($this->curlang = $this->get_current_language()))
return; // something went wrong
// --- modified --> check for guestbook, which should be display in different languages
$this->check_joined_content();
...
}
define("GUESTBOOK_PAGE_ID", "12");
define("GUESTBOOK_HTTP_PARAM", "guestbook_lang");
function check_joined_content() {
$gl = $_GET[GUESTBOOK_HTTP_PARAM];
if(isset($gl)) {
if ($this->curlang->object_id != GUESTBOOK_PAGE_ID) {
return;
}
if ($gl == "de") {
$this->curlang = $this->get_language("de");
} else {
$this->curlang = $this->get_language("en");
}
}
}
access to the pages via http get params:
?guestbook_lang=en
and ?guestbook_lang=de