Forums / Developer / Clean languages selector

Clean languages selector

Author Message

Jean-Luc Nguyen

Tuesday 25 November 2008 1:58:51 am

Hello peeps,

I have searched on the forum, but did not find any info.

How is the best way to code a multilingual selector which allows multilingual URLs?

To summarize, I have "en" & "fr" siteaccesses.
I have an object titles "products" in english and "produits" in french.

I need the selector to switch between /en/products & /fr/produits.

The ezwebin package sample only switch between /en/products & /fr/products..

Thanks a lot!

http://www.acidre.com

André R.

Tuesday 25 November 2008 2:23:52 am

At the moment you'll need the fetchurlalias extension.

{* locale is one of the entries in fetch( 'content', 'translation_list' ) *}
{def $translated_url = fetch_url_alias( $current_node_id, $locale.locale_full_code ))}

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Jean-Luc Nguyen

Tuesday 25 November 2008 2:34:01 am

Got it: http://ez.no/developer/contribs/hacks/fetch_multilingual_url_alias_by_locale

Thanks a lot!

http://www.acidre.com