2012-05-05, 00:58:11
Draxeiro Wrote:I switch the language using a setlanguage link that points to the homepage, so /?setlanguage=de in this case. The settings I am using on my 2 menu's are in my previous post.
(it should rather be ?setlang=de - but see below)
Draxeiro Wrote:However instead of just showing the actually existing pages in German, it shows the german pages PLUS the default Dutch ones that aren't available in German.
Subsequently clicking on a German page WILL then show only the actually available German pages but I cannot seem to make the language switch point to the just-german pages.
Do you include the language in the URL? like /de/slug?
If you use fancy URLs with %language% or %nondefaultlanguage%, setlang won't have an effect, as you have to use a specific language URL instead, i.e. a link /nl/slug?setlang=de would be translated by your .htaccess to /index.php?id=slug&lang=nl&setlang=de, which will show the dutch page and dutch navigation (but maybe with german menu texts?)
Just use the following link instead:
Code:
<a href="<?php echo htmlspecialchars(return_i18n_setlang_url('de')); ?>">deutsch</a>