Fuel_nav with multi-lingual sites

edited February 2015 in Share

I'm developing a multi-lingual site in Fuel and have a question about using fuel_nav to render the menus. I'm using the 'segment' option to control the display of the multi-lingual pages.

Using fuel_nav I can set the the 'language' parameter and it renders the currently selected language version of the navigation fine. However I would have also expected it to parse out the correct urls for the menu options i.e. 'http://mysite/de/about' for a german page & 'http://mysite/es/about' for a spanish page etc.

Ideally I don't want the CMS users to have to remember to correctly prefix the locations when they're creating navigation options in the admin panel, which it would currently appear is the only way of doing this.

Is there a way of configuring this?



  • edited 2:41AM
    The site_url (or url_to function which site_url will alias to in the upcoming release), should automatically append the language parameter if the following parameter is added and set to TRUE in your fuel/application/config/MY_fuel.php file:
    // Append the current language value to the site URL automatically $config['add_language_to_site_url'] = TRUE;
  • edited 2:41AM
    Fantastic! Works a treat. Thanks for getting back so promptly on the weekend!
Sign In or Register to comment.