if you thought of putting all your texts in variables in seperate .cfm and jsut doing a cfinclude and then calling these variables.  That way you could call your variables depending on the language  <cfif session.language eq french>
                   call the french file
               <cfelse>
                    call the english file
                </cfif>


and then you can just do your code normally using variables in your cfml to call your txt.


of course then there is the issue of maintaining 2 variable lists but i think its easier to have it all in one file rather than spread accross your code.


Gabriel

-----Original Message-----
From: Mickael [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 17, 2003 9:38 AM
To: CF-Talk
Subject: Best Practices

Hello All,

I have an app that seem to run very slow at time, I am looking for ways that I may not be using CF efficiently.

The app is in french and english, and is able user is able to switch back and forth from french to english.  I use a session variable for this.

My code states is <cfif session.language eq 1>english text<cfelse>french text</cfif>

Here a  piece of table

<table border="1" cellspacing="0" cellpadding="1" bordercolor="000066" align="center">
  <tr>
    <td><cfif session.language eq 1>Issue #<cfelse>Demande #</cfif></td>
    <td><cfif session.language eq 1>User ID<cfelse>Identification de l'usager</cfif></td>
    <td><cfif session.language eq 1>Date Logged<cfelse>Date d'entrée</cfif></td>

My question is, is is better to Have the whole english table under the first if statement then then entire french table in else faster than what I am doing above.  I like the method above because I have essentially only one table to view the other way I would have two.

I am looking for suggestion on how to optimize this.

Thanks

Mike
  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to