zMaestro wrote:
I want to load it depending on the language the user chose, the only problem is that it is based on Constants and I'm getting a name defined error!!! |
- Remove all CONST from language files (user for beter memory performances)
- Remove all <% Option Explicit %> from all pages (used only to avoid mistyping and undeclared variables)
You won't have this error anymore.
There is no solution with the same good performance in a multilingual environment. One easy solution (hard for memory perf) for quick integration is to make the modifications above and add these :
- Create a subdir for each language packs in the \language_files dir (ex : \language_files\FR\ ; \language_files\UK ; \language_files\DU ; etc.)
- Copy your language pack in the right directories
- Modify all the *_language_file_inc.asp in the \language_files directory (not in the subdirs of course) with this kind of code :
<%
' Something to get the language currently in use by the user, let's call it : active_language (2 = French, 3 = Dutch, 1 = English (default))
SELECT CASE Active_language
CASE 2
%><!-- #INCLUDE FILE=FR/*language_file_inc.asp --><%
CASE 3
%><!-- #INCLUDE FILE=DU/*language_file_inc.asp --><%
CASE ELSE
%><!-- #INCLUDE FILE=EN/*language_file_inc.asp --><%
END SELECT
%>
! : Replace all the * in the code above by the name of the page you are currently editing
! : change the dir name according your subdirs.
This is not very good because each language files are always included in the process but it may be done in 2 minutes.
Hope this helps.
Gilles