macromedia.coldfusion.cfml_general_discussion
[Top] [All Lists]

(beginner) Coldfusion: variable to change language

Subject: (beginner) Coldfusion: variable to change language
From: "Jerrzzzz" <webforumsuser@xxxxxxxxxxxxxx>
Date: Thu, 31 Jul 2008 12:21:54 +0000 (UTC)
Newsgroups: macromedia.coldfusion.cfml_general_discussion

Heyya,

 Whilst working at other stuff this summer, my boss wanted me to fix some stuff 
on a certain (small)website associated with my work. Sure, I thought, not 
knowing the site was built pretty much entirely in CF. Anyways, I thought I'd 
give it a shot so I've been reading the code and googling/trying to figure out 
how the stuff works.

 The thing I'm trying to do is add a little function which switches the site's 
language back and forth with links on the main page. I began thinking that 
using a variable that could be changed could work. So i pretty much defined a 
variable in application.cfm (lets call it "language") and did cfif's which 
compares "language" to a string, around two versions of the header (just the 
header to begin with).

 So, that works fine while manually changing the "language" variable in the 
code of application.cfm. What I just can't figure out is how I can make a link 
on the site, when clicked, change that variable to a specified string. Because 
it feels like, if I could do that, then it would work. When I've attempted to 
write code for this, it seems as you can't directly change a variable in 
application.cfm from the browser-side, true?

 I then thought, "ok, then I make a 'switchlang.cfm' and write some code 
changing the variable". Here is pretty much where I got stuck, as my half-assed 
attempts didn't get me anywhere.

 So please, please help me with this. Any pointers, solutions is most welcome. 
Am I going about this in a totally wrong way? I'm just looking for an easy 
solution that works.

 Please go easy on me, I just saw CF code a couple of weeks ago, so I may have 
written some major "wrongs", i know...:)


<Prev in Thread] Current Thread [Next in Thread>