2

I need help.

I have a Html template which i bought from Template Monster. I want to add 3 languages with flag to the top right corner in my template. This html template with two form. One is booking and other is contact. Language is.. English, Swedish and German. Suppose... When user click Swedish flag it's should be show all of website content with Swedish Language. If click German it's should be show German language.

How can do this. What functionality it's involve. Please someone tell me that. It'll better for me.

genesis
  • 50,477
  • 20
  • 96
  • 125
creativeartbd
  • 101
  • 3
  • 9
  • Please read the selected answer for this question [http://stackoverflow.com/questions/156911][1] [1]: http://stackoverflow.com/questions/156911 – Horacio Nuñez Jul 29 '11 at 08:24
  • @HoracioNuñez: you meant [this question](http://stackoverflow.com/q/156911/764846) – genesis Jul 29 '11 at 08:25
  • The "nice" way of doing it would involve programming. By looking at the way you have described the problem; it seems you don't have any programming experience, which brings us to plain HTML only. The solution would require lots of manual work in HTML. Please do confirm if that's what you want (i.e., no coding except HTML). – Jaywalker Jul 29 '11 at 08:27
  • Yes It's Only HTML code and there are 15-20 html pages with 2 form. – creativeartbd Jul 29 '11 at 08:44

3 Answers3

5

You have 2 options.

  1. create new html files in different languages for each language
  2. rewrite every public-viewable text to variables

After that, you can save user language in database, or in cookies. It's your choice

genesis
  • 50,477
  • 20
  • 96
  • 125
1

Does your website has only static HTML code or are you using any programming language? If it is simple HTML code, then probably the easiest way would be to make copy of HTML files with text in each language, and then add link to those pages, something like:

mysite.com (use default language)
mysite.com/about

mysite.com/sv  (swedish
mysite.com/sv/about etc.

As you commented that its only HTML. You can make 2 additional directories (for example, 'sv' and 'de') inside the main directory, copy only html files in each of the directories, and write the text in each of the file. You dont need to copy the CSS and images directories, instead you can link to them.

Roman
  • 3,764
  • 21
  • 52
  • 71
  • Yes this is only html code. It's may be 15-20 html pages with 2 forms. – creativeartbd Jul 29 '11 at 08:46
  • So you said me that to create 2 directories inside the main director. What happen if i put only html file in this 2 directory. – creativeartbd Jul 29 '11 at 09:16
  • i mean if you have main directory lets say root which has all html files in it, and you can access your index.html file like root/index.html. and if you create a directory 'sv' inside it, and place all html files(with swedish text on them) inside that directory, then you will be able to access your swedish pages by urls like root/sv/index.html ect. – Roman Jul 29 '11 at 09:21
  • But is there any way without create additional folder for each language? – creativeartbd Jul 29 '11 at 09:53
  • since you are using html files only (no programming), so you have to make copy of each html file and write text on it. Of course, creating folders is just option thing to keep structure clean. If you want to put all files in same folder, you can make rename each html file something like index_sv.html and index_de.html etc and place them in same folder. – Roman Jul 29 '11 at 09:56
  • Ok, Brother finally i got it. Thank you very much for your Help. – creativeartbd Jul 29 '11 at 10:16
0

Your either gonna need to have different versions of the website in varying languages, so when the swedish flag is clicked, it will run the index of the swedish version, or you can have some form of script that alters the content of your website varying of which flag is clicked.

Aaron Lee
  • 1,146
  • 3
  • 14
  • 29