2012-05-06, 18:14:25
mvlcek Wrote:This happens, if you switch to german on a page that does not have a german version.
See http://mvlcek.bplaced.net/ (which currently works like this, but hides sub pages - I18N_FILTER_MENU | I18N_FILTER_LANGUAGE | I18N_FILTER_CURRENT):You have to make sure that the set language links link to existing pages, e.g. always to index, if this page exists in all languages.
- if you switch the language on the index page (which has a german version), it will work as you want it to work
- if you go to e.g. getsimple (which has no german version) on the english site and then switch to german, it will not find a german version and show the english page, thus the language is english and the english menu is shown. The same happens if you manually switch to a non-existing language, e.g. /?setlang=fr.
Strange thing is that I had done it exactly the way you suggest and then it didn't work. As this is also the way I had done it on that other website.
Just tried it again, and now it does work!
However I did notice the language switch for the default language on the pages tab was suddenly back on the out-of-the-box 'de' instead of 'nl' I set and saved it to so maybe that was confusing it...
In any case, things seem to work fine now. Good to know that I was basically doing everything right (with the filter commands and language switch link), but odd that it didn't seem to work initially.