RE: [WSG] bi-lingual page?
Hi, This is stuff we're pretty much used to deal with on a daily basis, here in Belgium. We have 3 national languages : Dutch, German, and French. Not only do we do this on websites but also in regular software in which dynamic switching between languages should be possible, or printing in French while the interface is displayed in Dutch. Here you were talking about displaying the content simultaneously in Englisg and German. This is definitely easier to manage than dynamic language switching. The way I used to deal with this issue was to store all my content in a database and extract the text from one field or another (msg_fr, msg_de, or msg_en) based on the current language of the user. You can also achieve the same thing via external text files that you include in your main page (for example you have a page called mypage.php ... and this would include the content of mypage.php.de.txt if German is what you need or mypage.php.en.txt if English is required. The language of the user is usually stored in a cookie and you should apply a default language to a page. When you display the information, please mark your paragraphs with the appropriate lang attribute: either p xml:lang=de.../p (XHTML 1.1) or p lang=de (HTML 1.0). Please notice that your main page should be marked with a language attribute too : html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en (XHTML 1.1) or html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en (XHTML 1.0) Mark the paragraphs with their language attribute only if they differ from the default language of the page. You can easily decide to hide text in a certain language via CSS: *[lang=en] { display:none }. But this will NOT work with IE unfortunately. By using the lang attribute on your paragraphs, you will ease the pain of the search engines. If you want to implement dynamic language switching, you will have to implement a mechanism such as a link to a page that will update the cookie of the user: changelang.php?lang=en or changelang.php?lang=de. What thsi page does is very simple : it updates the cookie of the user and then gets back to the HTTP referrer (the page we're coming from so that it gets redisplayed). However, this can create some accessibility problems because it breaks the back sequence. Also, there may be some issues to solve with caching. Hope this helps Pat -Original Message- hi all this is the first time I've done anything like this but I'm wondering what it takes to display two languages (and therefore two charsets) on the same page? - English and German the content will be a side-by-side translation of each language thanx barry.b PS: no doubt I'll have more questions later but I'm starting from the display and working backwards to the content storage (ensuring the database can support unicode, etc) and then the content capture (a form in either English and German) ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help ** ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
RE: [WSG] bi-lingual page?
patboens You can easily decide to hide text in a certain language via CSS: *[lang=en] { display:none }. But this will NOT work with IE unfortunately. Although, when CSS is off (or when using older screen readers which do actually read out things hidden via display:none), the page will look funky. Patrick __ Patrick H. Lauke Webmaster / University of Salford http://www.salford.ac.uk __ Web Standards Project (WaSP) Accessibility Task Force http://webstandards.org/ __ ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] bi-lingual page?
On 10 Aug 2005, at 8:55 AM, Barry Beattie wrote: hi all this is the first time I've done anything like this but I'm wondering what it takes to display two languages (and therefore two charsets) on the same page? - English and German the content will be a side-by-side translation of each language thanx barry.b Barry, search the archive for this list - there was this exact question a month or two ago, and answers on how to use inline charsets for each language - I think what you need is there. HTH N ___ Omnivision. Websight. http://www.omnivision.com.au/ ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
RE: [WSG] bi-lingual page?
You should have been at the Brisbane meeting last night! Where this very thing was spoken about. Went right over my head but John Bates gave an excellent talk on the topic. His website is at codeHQ.net. Check it out, his talk should be up there as well as a heap of other stuff CodeHQ.net/blog/ Craig Rippon Brisbane, Australia -Original Message- From: Barry Beattie [mailto:[EMAIL PROTECTED] Sent: Wednesday, 10 August 2005 8:56 AM To: wsg@webstandardsgroup.org Subject: [WSG] bi-lingual page? hi all this is the first time I've done anything like this but I'm wondering what it takes to display two languages (and therefore two charsets) on the same page? - English and German the content will be a side-by-side translation of each language thanx barry.b PS: no doubt I'll have more questions later but I'm starting from the display and working backwards to the content storage (ensuring the database can support unicode, etc) and then the content capture (a form in either English and German) ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help ** ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] bi-lingual page?
English and German are both Latin1 languages, so no problem here. To be 100% safe use UTF8. -- Jan Brasna aka JohnyB :: www.alphanumeric.cz | www.janbrasna.com ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] bi-lingual page?
On Wed, 10 Aug 2005 08:55:48 +1000, Barry Beattie wrote: this is the first time I've done anything like this but I'm wondering what it takes to display two languages (and therefore two charsets) on the same page? - English and German The lang attibute will probably be useful - http://www.w3.org/TR/REC-html40/struct/dirlang.html eg html lang=en ... divthe english bits/div div lang=dethe german bits/div ... ie define the default language from the page then define the alternate language for one section of the page. Bit difficult when your users are split 50-50, but you pretty much need to pick a core language for the page :( HIH Lea ~ done from memory - german is de, right? -- Lea de Groot Elysian Systems - http://elysiansystems.com/ Brisbane, Australia ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] bi-lingual page?
Barry Beattie skrev: this is the first time I've done anything like this but I'm wondering what it takes to display two languages (and therefore two charsets) There can be only one charset on a webpage, but with unicode/utf-8 you still can have content in different languages on the same page. /AndersN ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **