Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

website with two language

Status
Not open for further replies.

walkerdigest

Programmer
Feb 10, 2009
35
TR
I want to code a website with two language (one of them is english) how can I manage that? thanks
 
tons of possibilities.
What have you so far?

[navy]"We had to turn off that service to comply with the CDA Bill."[/navy]
- The Bastard Operator From Hell
 
I am starting from scratch. what would be the easiest way? I will have navigator, announcements, slade, text in the website
 
1.) what is the other language going to be? you need to know in order to use the correct encoding for both your content files and your script session, e.g. utf-8 / 65001

2.) you could have all your content stored in language subfolders as text or html snippets which are then dynamically loaded into your ASP framework depending on a combo box choice / flag click etc.

3.) what is a "slade"? I just checked my translation dictionary, it won't tell

4.) of course you can do it all by yourself but you might also consider using a web cms solution like typo3, contao, drupal or joomla

If you have a variable holding your language choice and name your subfolders holding the localised content in the same manner, you your output portion could look like this:
Code:
<%
set fso=Server.CreateObject("Scripting.FileSystemObject")
pfad=Server.MapPath(language) & "\" & "index.htm"
Set f = fso.GetFile(pfad)
set ts=f.OpenAsTextStream
Inhalt=ts.ReadAll
response.write Inhalt
%>


[navy]"We had to turn off that service to comply with the CDA Bill."[/navy]
- The Bastard Operator From Hell
 
1) encoding will be 8859-9

2)if I understand correctly there will be /tr and /english subfolder. For example in /english subfolder it holds texts in English. what about menu titles? slide titles?

3) it should be slide.

4) I should have session variable or cookie to tell me that I have a language selection??
 
Read the part of the of the URL that tells you the language, show content from a database that is already translated.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top