I have a project in farcry that requires the site including the entire menu tree be available in English and French. I started looking at this and realized that I had no clue how to accomplish this. So, here’s what I did.
First, I created the site tree in English using Quick Site Builder. Then I created an identical site tree using Quick Site Builder for the French menus (after having first translated the menus to French). The site tree looks something like this:
Root - Home - English Menus
Root - French Home - French Menus
Second, I created a dynamic link in the page footer to toggle between English and French:
<cfif session.language eq "english">
<a href="index.cfm?objectid=#application.navid.french_home#&language=french">Français</a>
<cfelse>
<a href="index.cfm?objectid=#application.navid.home#&language=english">English</a>
</cfif>
After having created the menus I created a session variable to track where I was. I default this to English.
<cfparam name="session.language" default="english">
<cfparam name="session.languageNav" default="#application.navid.home#">
Now everthing is set up and I have to control where I send the user. Since each navigation item and page has a unique object ID, this has to be done dynamically. So, I test for the language like this:
<!--- set language variables --->
<cfif isdefined('url.french') AND url.french eq "true">
<cfset session.language = "french">
<cfset session.languageNav = application.navid.french_home>
</cfif>
<cfif isdefined('url.english') AND url.english eq "true">
<cfset session.language = "english">
<cfset session.languageNav = application.navid.home>
</cfif>
Finally, you will notice in the default header file in farcry sites a call to a nav class that probably looks like this:
<cfmodule template="/farcry/#application.applicationname#/webskin/includes/_genericNav.cfm"
navID="#application.navid.home#"
id="nav"
depth="2"
bActive="true"
bIncludeHome="true">
I change the nav class and called it dmHeaderCFAS.cfm. So, my call looks like this:
<cfmodule template="/farcry/#application.applicationname#/webskin/includes/cfasMainNav.cfm"
navID="#session.languageNav#"
depth="4"
bActive="true"
bIncludeHome="false">
Notice I am calling it with navID session.languageNav rather than Application.navid.home. LanguageNav will either contain the object ID of home or french_home, depending on which portion of the site the user is on.
Since Farcry sets up all the parent/child relationships on its own, all you have to do is give it a starting point which is why the french navigation items go under Root and not Home like they normally would.
The last thing to do is sit back and bask in your own glory. Yes, this step is optional but quite necessary in my book. ![]()

Related Articles
1 user responded in this post
Since this is an older post, have you stuck with this method for I18n of content? I’ve been tasked with the same thing recently. I was thinking having one root might be the better way and then under that have your language tree
root->en and root->fr, etc.. then on tree building select the sub node based on label in the tags.
What I’d really like to build is one tree where each content object had associated language objects, but that’s a big change to the core and could get really messy with version tracking.
Leave A Reply