Multi Lingual Forums
Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums Language Files
Forum Description: Language Files for Web Wiz Forums so that you can run it in your own language.
URL: https://forums.webwiz.net/forum_posts.asp?TID=13593
Printed Date: 28 March 2026 at 7:54am Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com
Topic: Multi Lingual Forums
Posted By: zMaestro
Subject: Multi Lingual Forums
Date Posted: 01 February 2005 at 8:27am
|
Is there a way i can make a forum multilangual?
i.e. uses 2 different Language Files, one for English and the other for Arabic for eg?
Thanks.
|
Replies:
Posted By: zMaestro
Date Posted: 23 February 2005 at 8:27am
Posted By: Lingua
Date Posted: 22 March 2005 at 2:20pm
|
Hi,
yes, you can setup Multilanguage forums, but its a liitle bit tricky.
One of the problems is, that the WebWiz Forum does not support utf-8, so you have to recode a few pages, to load a Country Meta Tag into the pages which supports the diffrent languages.
---- All following coding was done in the Version 7.9 WebWiz Forum
I made a rough and "dirty" coding for that and placed it in the common.asp as a function:
'Set the Language Session Variable Function L_Session() DIM L L = TRIM(Request.QueryString("L")) If L = "" Then If Session("L") = "" Then Session("L") = "US" Else If Session("L") = "DE" Then Response.Write("<meta http-equiv=""Content-Type"" content=""text/html; charset=iso-8859-1"">") End if If Session("L") = "US" Then Response.Write("<meta http-equiv=""Content-Type"" content=""text/html; charset=iso-8859-1"">") End if If Session("L") = "RU" Then Response.Write("<meta http-equiv=""Content-Type"" content=""text/html; charset=windows-1251"">") End if End If Else If L = "DE" Then Session("L") = "DE" Response.Write("<meta http-equiv=""Content-Type"" content=""text/html; charset=iso-8859-1"">") End if If L = "US" Then Session("L") = "US" Response.Write("<meta http-equiv=""Content-Type"" content=""text/html; charset=iso-8859-1"">") End if If L = "RU" Then Session("L") = "RU" Response.Write("<meta http-equiv=""Content-Type"" content=""text/html; charset=windows-1251"">") End if End if End Function
------------------------
Most of the files in the Forum use the /includes/skin_files.asp, so I included the call of the above function at the bottom of that file.
Just insert at the bottom the word L_Session and that should do the trick for most of the pages.
some files like upload from pictures do not use the skin_file.asp and there you have to enter the function call manual.
Just open (for example the upload_images.asp) and look for the line of code
<meta name="copyright" content="Copyright (C) 2001-2004 Bruce Corkhill" />
and enter after that <%L_Session%> thats it.
-----------------------
to trigger the languages, I entered some simple flags in the file /includes/navigation_buttons_inc.asp (In the beginning of the second <td> )
<a href="/forum_ru/default.asp?L=RU"><img src="/forum/forum_images/flags/flag_ru.gif" width="25" border="0"></a> <a href="/forum_de/default.asp?L=DE"><img src="/forum/forum_images/flags/flag_de.gif" width="25" border="0"></a> <a href="/forum_nl/default.asp?L=NL"><img src="/forum/forum_images/flags/flag_nl.gif" width="25" border="0"></a> <a href="/forum/default.asp?L=US"><img src="/forum/forum_images/flags/flag_usa.gif" width="25" border="0"></a>
-----------------------
Now you have done the basic setup. As you can see in the <a> tags above, i have setup 4 directories which connect to the same SQL Database. the only difference in the directories is the directory language_files, so its just copying 4 times the complete stuf into 4 diffrent directories like forum_nl and forum_de and so on.
-----------------------
I hope I did not forget anything, but that works, otherwise ask me.
I for myself made a litlle bit more complicated setup using virtual pathes except for the language_files directory, but to run that, you have to change in all forum/root asp files the pathes of the includes. This is a little more tricky, but it works.
You can take a look to a forum we have setup for testing purpose. If it runs well, we will pay for it next month. I think its worth paying for it. http://www.3cgi.de/forum - http://www.3cgi.de/forum
Regards
Lingua
------------- help others and they will help you.
|
Posted By: weipper2
Date Posted: 23 March 2005 at 9:49am
Everybody is asking for multi langual forum, i create my own multi-langual forum yesterday. Take a look to my testing forum : http://www.dev.cred.ca/isa/forumeng - ISA
The forum contain two language : french and english. I decided to
create 2 forums, one with french language files and buttons files, and
i did samething for english, both connect to the same database.
where i changed the code to get my select option list, is includes/navigation_buttons_inc.asp files
At the end of this file, add :
'Else the user is not logged
Else
'Display a welcome guset message with the option to login or register
Response.Write
(" <a href=""registration_rules.asp?FID=" &
intForumID & """ target=""_self"" class=""nav""><img src="""
& strImagePath & "register_icon.gif"" alt=""" &
strTxtRegister & """ border=""0"" align=""absmiddle"">" &
strTxtRegister & "</a>")
Response.Write
(" <a href=""login_user.asp?FID=" &
intForumID & """ target=""_self"" class=""nav""><img src="""
& strImagePath & "login_icon.gif"" alt=""" & strTxtLogin
& """ border=""0"" align=""absmiddle"">" & strTxtLogin &
"</a>")
End If
%></td>
</tr>
<tr>
<td align="right" class="smText">
<form action="functions/change_language.asp" method="get">
Select language<br>
<select name="choix"
onchange="this.form.submit();" class="smText"><optgroup
label="Language list" class="smText"><option value="-1"
class="smText">Select one</option><option value="fra"
class="smText">Français</option><option value="eng"
class="smText">English</option></optgroup></select>
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
After, you have to create a new file functions/change_language.asp, and add this code :
<%
if request.querystring("choix")="fra" then
dim strlink
dim strlink2
strlink = Request.ServerVariables("HTTP_Referer")
arrlink = Split(strlink,"/")
arrlink(4)="forum"
For i = lbound(arrlink) to ubound(arrlink)
if i = ubound(arrlink) then
strlink2=strlink2&arrlink(i)
else
strlink2=strlink2&arrlink(i)&"/"
end if
Next
Response.Redirect(strlink2)
elseif request.querystring("choix")="eng" then
strlink = Request.ServerVariables("HTTP_Referer")
arrlink = Split(strlink,"/")
arrlink(4)="forumeng"
For i = lbound(arrlink) to ubound(arrlink)
if i = ubound(arrlink) then
strlink2=strlink2&arrlink(i)
else
strlink2=strlink2&arrlink(i)&"/"
end if
Next
Response.Redirect(strlink2)
end if
%>
In bold, there is your both main forum, just change the name you give
to the folder. So I hope it could help you, and I just wanna excuse my
writting, i'm a french canadian and I suck in english :p.
|
Posted By: weipper2
Date Posted: 23 March 2005 at 10:01am
Someone could help me to keep language selection in cookie or something
like that? It would be nice for guest if they dont have to change
always language each time they visit the forum.
Oh and i'm forgetying it, i'm working for redirecting to the last url
when the language is selected, if someone can give me the command, i
will appreciate that . Because now, its always redirect to default.asp and its not cool 
|
Posted By: dfrancis
Date Posted: 23 March 2005 at 10:41am
|
Everybody is asking for multi langual forum, i create my own multi-langual forum yesterday. Take a look to my testing forum : http://www.dev.cred.ca/isa/forumeng - ISA
The forum contain two language : french and english. I decided to create 2 forums, one with french language files and buttons files, and i did samething for english, both connect to the same database.
great idea... I will watch closely.
I tried to select Enlish and received...
Microsoft VBScript compilation error '800a0400'
Expected statement
/isa/forumeng/functions/change_language.asp, line 5 "forum/"& Request.ServerVariables("URL")
^
|
Posted By: weipper2
Date Posted: 23 March 2005 at 1:43pm
|
oups sorry, i'm trying something for redirection in last url, just copy the code in my message, it work fine.
|
Posted By: weipper2
Date Posted: 23 March 2005 at 2:21pm
|
OK i had the new code, the redirection works fine too, if you find some errors, let me know :)
|
Posted By: zMaestro
Date Posted: 25 March 2005 at 2:49am
|
emm.. I think you are complication the matter a little... I have a Mulitlingual forum running without any change in coding (except in the code page), the only program is in the language file...
language_file_inc.asp
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!!!
|
Posted By: weipper2
Date Posted: 29 March 2005 at 9:14am
Its not complicate, you just have to have 2 forums(Dont forget to
change buttons, ect not only languages files). But if you find a better
working solution, please say it to me!
|
Posted By: Lingua
Date Posted: 30 March 2005 at 10:57am
|
Hi,
I integrated the multilanguage stuff into a page, including German / englisch / russian and netherlands. The language is stored in the cookie of the user and all the language files are stored in one folder.
The coding is easy, now comes the but....
I am running into strange java errors when I use the editor. If some of the more expirenced coders here would like to join the developing, I will send them the necessairy sources that I have.
------------- help others and they will help you.
|
Posted By: weipper2
Date Posted: 31 March 2005 at 9:27am
ummm its look very fine! It would be nice if you can give necessairy sources :)
But sorry for your problems, I cant help you
edit:Why image button doesnt change when I select languages? :(
|
Posted By: Lingua
Date Posted: 31 March 2005 at 12:16pm
|
I will sitdown on the weekend and see if I can find this f**** java error in the RTE Editor.
The other way would be to integrate the new RTE Version 3.0, but thats also no 2 minute job, I esteemated more than 10 hours of work for that, cause I did not develop the forum or the RTE...
If it works with the editor, I will zip you the stuff (It will be done for SLQ Server, not for access)
Andreas
------------- help others and they will help you.
|
Posted By: Geforce
Date Posted: 31 March 2005 at 5:18pm
Lingua wrote:
I will sitdown on the weekend and see if I can find this f**** java error in the RTE Editor.
The other way would be to integrate the new RTE Version 3.0, but
thats also no 2 minute job, I esteemated more than 10 hours of work for
that, cause I did not develop the forum or the RTE...
If it works with the editor, I will zip you the stuff (It will be done for SLQ Server, not for access)
Andreas |
http://www.genocap.de/forum/ - http://www.genocap.de/forum/
Can you upload this mod here ?
Thanks. 
------------- Killer from http://www.xlteam.net
|
Posted By: Lingua
Date Posted: 01 April 2005 at 1:42am
|
Yes, sure I will put it as is in a zip with a small description on my
"XL-Plus" Webpage, that way I do not have to care about the traffic.
It will be there on sunday, but remember, I still have that prob with the editor, but maybe you have a solution for that 
------------- help others and they will help you.
|
Posted By: Geforce
Date Posted: 01 April 2005 at 1:54am
Cool , thank's you.
------------- Killer from http://www.xlteam.net
|
Posted By: Lingua
Date Posted: 04 April 2005 at 5:54pm
|
Hi, sorry for the delay
I promised the updates for the weekend, but I couldnt make it earlier.
You can download the files and stuff I have made until now from there.
There still is a small java bug in the RTE of the editor, which I havent found yet, please feel free to help me and to give me feedback.
I will integrate coding suggestions into the multilanguage forum, so maybe we bring this project together to an end.
Regards Lingua
------------- help others and they will help you.
|
Posted By: weipper2
Date Posted: 05 April 2005 at 10:59am
I will try to help you for your error. I hope this project will be complete soon!
edit: I just wanna know if it is possible to change button images (change language) with your multi-language forum?
|
Posted By: TurkeLLi
Date Posted: 08 April 2005 at 6:17am
|
where can I download this mod?
|
Posted By: weipper2
Date Posted: 08 April 2005 at 9:25am
http://www.genocap.de/forum/uploads/administrator/2005-04-04_233910_multi_lang_update.zip - here
or
go on this http://www.genocap.de/forum/ - forum , register
you and download files if the first link dosent work. but its still
have java bug, you cant click on button in RTE post message :(
|
Posted By: Acke
Date Posted: 08 April 2005 at 3:46pm
|
Isn't mutch easyer to use something like this
<% If Request.QueryString("language") <> "" Then
If Request.QueryString("language") = "SWE" Then Session("language")="SWE"
ElseIf Request.QueryString("language") = "ENG" Then Session("language") = "ENG"
End IF
Else
If Session("language") = "" Then Session("language") = "SWE"
Else
Session("language") = Session("language")
End If
End If
If Session("language") = "SWE" Then
'########################################### -[ Swedish here ]- ###########################################'
strTxtThisPageWasGeneratedIn = "And your text here"
strTxtSeconds = "And your text here."
End If
If Session("language")="ENG" Then
'########################################### -[ English here ] ###########################################'
strTxtThisPageWasGeneratedIn = "And your text here"
strTxtSeconds = "And your text here"
End If
%>
|
In this way can you use differens language in 1 page and use the default language in this forum then add your own language...
and include it to your forum pages!!!
Sorry for my bad english
|
Posted By: Lingua
Date Posted: 08 April 2005 at 3:54pm
|
Thats a nice way too, but you will get a very very long language Page if you support a few languages. This will slow down your server as he has to read it always, for every Page.
Normal this forum should read the complete translation stuff only one time into an global array, when it starts its webservice and thats it, you do not have to read the language any more while the forum is running.
But thats again a lot more coding and I do not know if its worth doing it when there will be a major release change in a few weeks or month (Version 8 will be totaly redesigned).
------------- help others and they will help you.
|
Posted By: TurkeLLi
Date Posted: 09 April 2005 at 6:33am
Acke wrote:
Isn't mutch easyer to use something like this
<% If Request.QueryString("language") <> "" Then
If Request.QueryString("language") = "SWE" Then Session("language")="SWE"
ElseIf Request.QueryString("language") = "ENG" Then Session("language") = "ENG"
End IF
Else
If Session("language") = "" Then Session("language") = "SWE"
Else
Session("language") = Session("language")
End If
End If
If Session("language") = "SWE" Then
'########################################### -[ Swedish here ]- ###########################################'
strTxtThisPageWasGeneratedIn = "And your text here"
strTxtSeconds = "And your text here."
End If
If Session("language")="ENG" Then
'########################################### -[ English here ] ###########################################'
strTxtThisPageWasGeneratedIn = "And your text here"
strTxtSeconds = "And your text here"
End If
%>
|
In this way can you use differens language in 1 page and use the default language in this forum then add your own language...
and include it to your forum pages!!!
Sorry for my bad english
|
Funkar din???
Jag bor också i sverige :D
|
Posted By: _red_zion_
Date Posted: 18 April 2005 at 1:05am
|
I have similar problems... I translated and modified translations of english, deutch, slovenian and croatian but there is one problem...
If you want to write something there is JAVA SCRIPT error on RTE_*.asp Does anybody know what is the solution for this?
Is maybe in RTE missing some code etc?
I know that <%L_Session%> don't work, so maybe this is problem? I know also that in RTE_*.asp you don't call "language session" as in other files and if you ask me, there is character set problem, becouse you use different character set in language files as in RTE files...
|
Posted By: _red_zion_
Date Posted: 18 April 2005 at 7:13am
|
the problem is that java script fails to run in inframe or in file RTE_textbox.asp...
|
Posted By: weipper2
Date Posted: 19 April 2005 at 12:29pm
I dont know dude for this error, i tried with the mod creator and we havnt ideas :(
But I created a working version http://forums.webwiz.net/forum_posts.asp?TID=13593&PN=1&TPN=1 - in page 1 , its work fine. You can take a http://www.cred.ca/isaforum - look here , but dont register, its will be a professional web site soon and i dont want test threads or something like that :p
|
Posted By: _red_zion_
Date Posted: 19 April 2005 at 4:51pm
|
how can you test your forum if you have locked it up?
Error becomes when somebody want to write some text etc... RTE_ buttons don't work etc... That you can't test if you have locked...
test here:
http://www.redzion.com/forum/forum_posts.asp?TID=192&PN=1 - http://www.redzion.com/forum/forum_posts.asp?TID=192&PN=1
|
Posted By: _red_zion_
Date Posted: 19 April 2005 at 4:53pm
|
+ can you send me french translation to my mail?
mailto:podpora@redzion.com - podpora@redzion.com
THANK YOU!
|
Posted By: weipper2
Date Posted: 21 April 2005 at 9:26am
_red_zion_ wrote:
how can you test your forum if you have locked it up?
Error becomes when somebody want to write some text etc... RTE_
buttons don't work etc... That you can't test if you have locked...
test here:
http://www.redzion.com/forum/forum_posts.asp?TID=192&PN=1 - http://www.redzion.com/forum/forum_posts.asp?TID=192&PN=1 |
There is a difference between MY mod multi-language forum and Maestro's mod. Mine is working, just take a look http://www.cred.ca/isaforum - here , and i gave you the instruction in page 1.
|
Posted By: _red_zion_
Date Posted: 23 April 2005 at 7:08am
|
jao... my mod is working to (+ I have more translations) (look http://www.redzion.com/forum/ - http://www.redzion.com/forum/ ) but there become error when you try to writte something...
How can we test your forum if you have locked up new registration members and for making posts you must be registered...
Can you send me your MOD...?
|
Posted By: _red_zion_
Date Posted: 23 April 2005 at 7:09am
|
+ problem of your mod is that you don't have everything on one web address (my MOD is all on one web address)...
|
Posted By: Gilles
Date Posted: 25 April 2005 at 4:23am
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
|
Posted By: _red_zion_
Date Posted: 26 April 2005 at 7:00am
|
Is this also solution for my language files system which has java error in RTE_textbox.asp - Object Expected...
|
Posted By: weipper2
Date Posted: 27 April 2005 at 4:28pm
|
the creator of this mod havent solution and need help of comunity for this error.
|
Posted By: TurkeLLi
Date Posted: 30 April 2005 at 6:57pm
|
Can anyone give link for download..
|
Posted By: _red_zion_
Date Posted: 01 May 2005 at 7:44pm
|
http://www.redzion.com/forum/
|
Posted By: faca5
Date Posted: 05 November 2005 at 6:00am
weipper2 wrote:
http://www.genocap.de/forum/uploads/administrator/2005-04-04_233910_multi_lang_update.zip - here |
It don't work?
Gilles wrote:
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 |
Than you! That have some sense.
But with CONST and INCLUDE FILE doesn't exist perfect answer. Sure with one forum!
Lingua wrote:
Hi,
You can take a look to a forum we have setup for testing purpose. If it runs well, we will pay for it next month. I think its worth paying for it. http://www.3cgi.de/forum - http://www.3cgi.de/forum
|
How do you do your multilanguage.
With CONST and INCLUDE FILE?
About cookies. What happen if cookies are not enabled? 
Some links...
http://www.studiofaca.com/forum/forum_posts.asp?TID=2568&PN=1&TPN=1 - http://www.studiofaca.com/forum/forum_posts.asp?TID=2568&PN=1&TPN=1
------------- http://www.studiofaca.com/" rel="nofollow - StudioFACA Portal :: http://www.renes.si/" rel="nofollow - NepremiÄnine
|
Posted By: klaithem
Date Posted: 16 November 2005 at 12:38pm
|
Hi
Could you please pass the lasted working multi-language mod so i can add Arabic to it
my email is mailto:klaithem@gmail.com - klaithem@gmail.com
or place it within this forum
|
|