I am currently at a bit of a loss with regards to setting up different language versions on a current project that do not contain the exact same pages.
On a previous project I used <?php get_i18n_navigation(return_page_slug(), 0, 100, I18N_SHOW_LANGUAGE); ?> on the standard I18n navigation that worked perfectly in combination with a language switch to the root using ?setlang=en. Only the smaller number of pages for that language showed up after clicking the language switch link.
However this site uses a pulldown menu + a 2nd independent navigation in the sidebar.
Looking at Martin Vlcek's website I reasoned the correct syntax should be <?php get_i18n_navigation(return_page_slug(),0,4,I18N_FILTER_MENU | I18N_FILTER_LANGUAGE); ?> for the pulldown menu.
And <?php $bc = return_i18n_breadcrumbs(return_page_slug()); get_i18n_navigation($bc[0]['url']=='sidebar-navigatie'?return_page_slug():'sidebar-navigatie',1,99,I18N_FILTER_MENU | I18N_FILTER_LANGUAGE);?> for the sidebar menu.
Yet upon switching the language it shows all the navigational links, in this case 3 German ones and the rest from the default Dutch. Which is not what I want obviously.
When I click on one of the German links all the Dutch links dissappear and only the German ones remain. That is what I want!
How can I make sure that when I switch the language from Dutch to German, only the actually existing German pages show up, and not the Dutch ones filling the gaps as it where?
From reading Martin's explanation on his website I thought the filter method used above would do the job, but apparently not.
Hope somebody can help me out with this.
Thanks in advance!
On a previous project I used <?php get_i18n_navigation(return_page_slug(), 0, 100, I18N_SHOW_LANGUAGE); ?> on the standard I18n navigation that worked perfectly in combination with a language switch to the root using ?setlang=en. Only the smaller number of pages for that language showed up after clicking the language switch link.
However this site uses a pulldown menu + a 2nd independent navigation in the sidebar.
Looking at Martin Vlcek's website I reasoned the correct syntax should be <?php get_i18n_navigation(return_page_slug(),0,4,I18N_FILTER_MENU | I18N_FILTER_LANGUAGE); ?> for the pulldown menu.
And <?php $bc = return_i18n_breadcrumbs(return_page_slug()); get_i18n_navigation($bc[0]['url']=='sidebar-navigatie'?return_page_slug():'sidebar-navigatie',1,99,I18N_FILTER_MENU | I18N_FILTER_LANGUAGE);?> for the sidebar menu.
Yet upon switching the language it shows all the navigational links, in this case 3 German ones and the rest from the default Dutch. Which is not what I want obviously.
When I click on one of the German links all the Dutch links dissappear and only the German ones remain. That is what I want!
How can I make sure that when I switch the language from Dutch to German, only the actually existing German pages show up, and not the Dutch ones filling the gaps as it where?
From reading Martin's explanation on his website I thought the filter method used above would do the job, but apparently not.
Hope somebody can help me out with this.
Thanks in advance!