catfish Posted August 8, 2009 Report Share Posted August 8, 2009 I am building a website that will have an English version and a German version. Is there a correct way to do this? I have started it but am just building my pages, duplicating each, changing the language and links for each. I wonder if there is a proper way. Quote Link to comment Share on other sites More sharing options...
falkencreative Posted August 8, 2009 Report Share Posted August 8, 2009 I don't think there is necessarily a "right" and "wrong" way to go about this. If you are making a static website, duplicating the pages and updating the content is probably the best way. Quote Link to comment Share on other sites More sharing options...
PicnicTutorials Posted August 8, 2009 Report Share Posted August 8, 2009 You could do a style sheet switcher. German display none. Switch, German display block, English display none. Quote Link to comment Share on other sites More sharing options...
falkencreative Posted August 8, 2009 Report Share Posted August 8, 2009 You could do a style sheet switcher. German display none. Switch, German display block, English display none. Good idea -- I hadn't thought of that. However, it probably wouldn't work if the English site needed English file names, and the German site needed German file names... I suppose you could do some .htaccess work to rewrite the file names, but that sounds kinda tricky. Quote Link to comment Share on other sites More sharing options...
PicnicTutorials Posted August 8, 2009 Report Share Posted August 8, 2009 Yeah, wouldn't know how to do that. You could of course change the menu names etc. You could give the file names a generick term that maybe made sense for both parties. Quote Link to comment Share on other sites More sharing options...
catfish Posted August 8, 2009 Author Report Share Posted August 8, 2009 Thanks for the replies and suggestions. I don't know what you mean by "style sheet switcher. German display none. Switch, German display block, English display none" How and where do you code that? Quote Link to comment Share on other sites More sharing options...
PicnicTutorials Posted August 8, 2009 Report Share Posted August 8, 2009 Thanks for the replies and suggestions. I don't know what you mean by "style sheet switcher. German display none. Switch, German display block, English display none" How and where do you code that? well you would implement a style switcher like one here... http://www.visibilityinherit.com/code/style-sheet-switcher.php then you would put those rules I mentioned in their respective style sheets. Quote Link to comment Share on other sites More sharing options...
catfish Posted August 8, 2009 Author Report Share Posted August 8, 2009 Thanks, I'm going to have a look and play with it. I appreciate it. Quote Link to comment Share on other sites More sharing options...
lm Posted August 9, 2009 Report Share Posted August 9, 2009 (edited) I wouldnt do any "style" switcher because it is a content changing (depending on language) going on here if to be precise. So you just make 2 pages in both languages ( most effective is to have PHP includes - will help when you will need to update the pages) and have a special button to switch to another language version. One most useful thing for multilingual website could be IP analyzer (which opens, for example, German version of home page for people with german based IP's). Edited August 9, 2009 by lm Quote Link to comment Share on other sites More sharing options...
Susie Posted August 9, 2009 Report Share Posted August 9, 2009 Are you using a content management system like Wordpress or something? If so, there may be plugins that will help you get the job done. This one is for Wordpress: http://www.poplarware.com/languageplugin.html . Quote Link to comment Share on other sites More sharing options...
Andrea Posted August 9, 2009 Report Share Posted August 9, 2009 Are you using a content management system like Wordpress or something? If so, there may be plugins that will help you get the job done. This one is for Wordpress: http://www.poplarware.com/languageplugin.html . I'm using that one on my personal blog - it works great. Quote Link to comment Share on other sites More sharing options...
PicnicTutorials Posted August 9, 2009 Report Share Posted August 9, 2009 (edited) I wouldnt do any "style" switcher because it is a content changing (depending on language) going on here if to be precise.So you just make 2 pages in both languages ( most effective is to have PHP includes - will help when you will need to update the pages) and have a special button to switch to another language version. One most useful thing for multilingual website could be IP analyzer (which opens, for example, German version of home page for people with german based IP's). Why wouldn't you use a style sheet switcher? "because it is a content changing (depending on language) going on here if to be precise." ??? With a style sheet switcher, you can do it all with PHP includes as well. Say he switches over, now everywhere they travel (from page to page) they stay in German (or English depending on language spoken). When they go back to the site 10 days later, it's still presented in their preferred language. I don't think one way is better here, just a different way of doing it. Each with their own positives and negatives... Edited August 9, 2009 by Eric Quote Link to comment Share on other sites More sharing options...
catfish Posted August 10, 2009 Author Report Share Posted August 10, 2009 (edited) Thankyou all for the replies. I did play a bit with the style switcher and managed it sortof. I didn't totally understand what I was doing with the 'German display block, English display none' I haven't done much PHP so I don't understand the 'PHP includes' thing mentioned and this website is for a non paying friend so I haven't spent much time on it. I think I may just stick to making 2 pages of each in different languages. Funny thing is that just days ago I was asked to do some updates on an existing website (for a paying client) and the one update is to have an Arabic version. Go figure! Oh, and no I wasn't building it with CMS or Wordpress, but could look into that as well. Thanks Edited August 10, 2009 by catfish Quote Link to comment Share on other sites More sharing options...
PicnicTutorials Posted August 10, 2009 Report Share Posted August 10, 2009 (edited) Like this... The html page { visibility: inherit; } Testing English German In the default style sheet... #german{display:none;} In the alternate style sheet... #english{display:none;} #german{display:block;} In the PHP english.inc file... English Stuff In the PHP german.inc file... German Stuff And put all the JS in a file called... styleswitch.js And of course this is all explained in greater detail here and here. Edited August 10, 2009 by Eric Quote Link to comment Share on other sites More sharing options...
catfish Posted August 16, 2009 Author Report Share Posted August 16, 2009 <?php include("includes/nav.inc"); ?> Speedy Translations - Herzlich willkommen! Welcome! English German <?php include("includes/english.inc"); ?> <?php include("includes/german.inc"); ?> © Speedy Translations Tel: (02635 / 921140) Email info@speedy-translations.de Quote Link to comment Share on other sites More sharing options...
PicnicTutorials Posted August 16, 2009 Report Share Posted August 16, 2009 Hi that link is not working for me. Have you created the JS, CSS, and .inc files? If so, it looks like it should work. Here is what I suggest. Get rid of php inludes for now. Worry about those later once you get it working. Less to think about. Quote Link to comment Share on other sites More sharing options...
catfish Posted August 16, 2009 Author Report Share Posted August 16, 2009 The link should be working now. I know it wasn't working for a bit when I looked yesterday as well. Wouldn't you know it that it's when you tried it. I thought I needed the english.inc and german.inc for it to work? Quote Link to comment Share on other sites More sharing options...
lm Posted August 16, 2009 Report Share Posted August 16, 2009 I still think that this "style" switcher makes sense if you have small includes with the text in other languages. To create fully functional website in 2 equal language versions it is better to have 2 full sets of HTML pages for each language ( with the link to other language on each page). Once you done it, to make website easy updatable, look into how to use PHP includes. If content for both languages needs frequent updates, do use CMS - WordPress seems most likely to be useful here as it has this plugin. Quote Link to comment Share on other sites More sharing options...
Andrea Posted August 16, 2009 Report Share Posted August 16, 2009 It's not working - the only thing that switches is the background color, English and German are both displayed. Look at the code -you have multiple sets of doctypes and html tags. Also, the ?'s, ?'s, and ?'s are showing up as odd symbols. They should be written like "& uuml;" etc. When you create the include parts, they only need what will actually be included - so no doctype, etc. That and the body and html tag are likely in your 'master' page. Quote Link to comment Share on other sites More sharing options...
Andrea Posted August 16, 2009 Report Share Posted August 16, 2009 One of the reasons it's not working is probably that in the HTML, you have (upper case) but in the CSS you use #german (lower case) - don't forget, this stuff is case sensitive. Quote Link to comment Share on other sites More sharing options...
catfish Posted August 16, 2009 Author Report Share Posted August 16, 2009 Ah ha! Thankyou Thelma. It seems to work now. I'm not sure which way I will do the site. Most of it is already built with 2 sets of pages, (english and german) with their correct navigation. I just want to understand this though, If I use the style switcher for the website, would I need to create new english and german .inc files (with different names to hold the different content? I don't understand that. English German <?php include("includes/english.inc"); ?> <?php include("includes/german.inc"); ?> Quote Link to comment Share on other sites More sharing options...
Andrea Posted August 16, 2009 Report Share Posted August 16, 2009 I don't see a point in using includes the German and English parts. Includes make sense when the same thing is used on multiple pages (like headers, footers, and navigation, for example). When you use the styleswitcher, it works by hiding parts. Your English text is in a div called english, the German stuff in one called german. The stylesheet that's applied when one clicks on 'english' hides the german div, and the stylesheet for 'german' hides the English Div. One thing I'm wondering so - using the style switcher - as one moves through the site from page to page, will the next page automatically use the same style as one's picked on the current view, or will it default to one of the two? Quote Link to comment Share on other sites More sharing options...
PicnicTutorials Posted August 16, 2009 Report Share Posted August 16, 2009 As Thelma said, there's not much point in using the includes unless they're going to be repeated. And yes, your language preference would be maintained as you navigate from page to page. And for the amount of time (in days) you wish. That's what the number does in the anchor. So when they come back to the site later, it's still in the language they picked last. Quote Link to comment Share on other sites More sharing options...
virtual Posted August 16, 2009 Report Share Posted August 16, 2009 I have done several sites in two or three languages and like LM I just use different html pages for each language. Whichever method you use, it is a pain as every time there is an update it has to be done in both languages regardless of whether they are on 1 page or 2. That is something you need to take into account if you are updating the site for your client so you bill them for double the work. Hopefully your client will provide you with the text in each language, not like me where they give me the English and expect me to translate to the other language as well..... Quote Link to comment Share on other sites More sharing options...
catfish Posted August 16, 2009 Author Report Share Posted August 16, 2009 Right, thank you all for the help and input. I think I am going in the right direction. Will carry on with html pages of each but once again have learned a few things along way - and yes both clients have the translated text ready for me as well. Thanks again Quote Link to comment Share on other sites More sharing options...
catfish Posted August 22, 2009 Author Report Share Posted August 22, 2009 Hi, me again. I've had a little break from this issue of multi languages. Had decided (for the one site) to just build 2 pages for each language (or, you know what I mean) Susie had asked if I was using CMS for it and at the time I didn't think so but turns out now the one client wants me to. So, yes I have used CMSmade simple a few times now and may try to figure out that module. I just had a brief look at it and when I have installed CMS on this clients server I will work with it. So, when the time comes, have you actually used the one in CMSmadesimple? It is called babel. Or have you just used the one in Wordpress and would you help me out when the time comes? Thanks Quote Link to comment Share on other sites More sharing options...
Andrea Posted August 22, 2009 Report Share Posted August 22, 2009 I'm using the one in Wordpress - and if I remember how I set it up (it's been a while and it wasn't very difficult) I'll help where I can. Quote Link to comment Share on other sites More sharing options...
catfish Posted August 23, 2009 Author Report Share Posted August 23, 2009 Thankyou very much Thelma. Quote Link to comment Share on other sites More sharing options...
Susie Posted August 23, 2009 Report Share Posted August 23, 2009 I've never used any of them, but I can't imagine they'd be too hard to implement. I just did a quick search for multi language plugins for Wordpress. http://wordpress.org/extend/plugins/tags/multilanguage Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.