• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Website with two languages, can it be done with straight HTML/CSS?

VinylxScratches

Golden Member
Is it possible to change the language without requiring a use of a higher level programming language? To just have a Polish and English button and the site will stay in that form?? I am trying to design a static site but have the choice of language... otherwise I'll learn PHP or Ruby.... I know how to do it in .NET but hosting is expensive.
 
Well, of course it's possible. Just make a Polish subdirectory, make an English subdirectory, and re-create the site in each subdirectory. And have the top level be just two buttons. I've seen this done. You might add a common /images directory for images that don't have text.

A better question is probably what's easiest for you? PHP isn't that different from .NET. Just remember to prefix all your variables with $ signs. (Yes, there's more to it than that.)

Also, have you considered whether server-side includes would work for you?
 
You could theoretically make it a single site with both types of content on every page, then hide the unused language with Javascript. Cookies and query string to keep track of it.
 
No need to hide things, apache and most web browsers have the capability to communicate to each other "Hey, I'm a web browser in poland!" With apache it is as simple as appending .es or .pl to the end of each file (the extension determines the language) for the language you want.
 
Easiest way would be to have both languages in Div's and the one that is default shows up in it's div while the other is invisible. If you click the other language button it hides the default and shows the alternate. This can easily be done with JQuery or Dojo.

You can do what you want via server side scripting language like php or .net but it isn't necessary. It probably would be a lot more modular but it really depends on who maintains the site for what you should do vs not do
 
Back
Top