Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Support for multilanguage sites, Internationalization (I18N)
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!
Reply


Messages In This Thread
rewrite language problem - by tomkop - 2013-03-27, 06:34:44
Enhancement suggestion - by hameau - 2013-05-12, 04:17:12
Enhancement request - by hameau - 2013-06-14, 20:02:07
RE: Enhancement request - by mvlcek - 2013-06-14, 22:04:12
RE: Enhancement request - by hameau - 2013-06-14, 23:01:36
Duplicate language cookies bug - by enzy - 2013-08-20, 07:03:26
RE: Duplicate language cookies bug - by ohayo - 2013-08-20, 18:12:25
Plugin is not shown - by tosho - 2013-09-15, 12:10:37
1000 pages limit in i18n_navigation - by titus - 2014-10-13, 21:58:36
Bug found - by lbarsov - 2014-10-17, 03:41:53
Menu with picture - by Dimi - 2015-04-28, 16:05:45
Rendering Menu in Component - by Alexander_ - 2016-05-04, 23:06:51
Meta desc for different languages - by Alexander_ - 2017-02-14, 20:29:32
Hierarchical Menus - by celextel - 2019-07-26, 16:41:47
Ri18n_navigation - by celextel - 2021-02-19, 16:07:48
Support for multilanguage sites, Internationalization (I18N) - by Draxeiro - 2012-05-02, 05:24:56



Users browsing this thread: 10 Guest(s)