Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2005-05-02 23:40:02
- nytram
- New Member
- Registered: 2005-05-02
- Posts: 4
Bilingual web site
Since it’s my first post – hi! Just created my first site with texpattern! Anyway…
Problem: Competely bilingual website. Each page should have an English and a Welsh version. It should be possible to switch between the Welsh and English version via a link on each page. Of course the static text on each page should also change language – e.g. copyright and navigation.
The site (www.truemarketing.co.uk – comments welcome!) makes use of sections for each link on the left navigation bar. There is one page template which generates the page for each section using the (very useful!) mdn_if_section plugin.
I thought of getting this working using categories: assign each article either welsh or english then use an if_category plugin on my page template. However there doesn’t seem to be and if_category plugin that works when you display a single article on the page – only a list of all articles in that category.
Bilingual websites must be a common requirement? no? I can’t find any resources on this. There must be an elegant way (or even a way!) of getting such a setup working! Thanks for any help in advance!
Offline
#2 2005-05-03 14:15:43
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Bilingual web site
I’m trying to find a solution for this myself. Did you have a look at the new txp:if_article_category tag? It works on a single article page. I still haven’t upgraded from g1.19 so can’t try myself, but I’m very interested to hear if it works.
Offline
#3 2005-05-03 14:35:31
- nytram
- New Member
- Registered: 2005-05-02
- Posts: 4
Re: Bilingual web site
I stumbled across that thread a few days ago but I don’t think it’s going to work. The way I read it:
> I’ve tested the txp:if_article_category tag, it works fine (but only in an article form).
means that it will not work within a page template (which is where I need it to, for example, display the copyright notice in the correct language.) If you think I’m mistaken I will try it out for you this evening since I’m running RC3.
It’s not the ideal solution to the bilingual problem though even if it does work. I don’t know enough about plugins to know whether this is an application for one…?
Offline
#4 2005-05-03 15:35:09
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Bilingual web site
I’m having exactly the same doubts. I’ve also been thinking about using sections instead of categories for the languages, but I’m not sure if that will take care of everything. I’m working on this site (not finished at all yet), with sections for the info pages in different languages, but there is also a photo gallery in a section of its own and so far I haven’t found a better solution than creating a three language menu for that page. But I don’t like it very much…
Well, hopefully someone else will provide a solution…
Offline
#5 2005-05-05 00:45:13
- davidm
- Member
- From: Paris, France
- Registered: 2004-04-27
- Posts: 719
Re: Bilingual web site
The problem of multi-lingual website has already been brought up here and also here. Might interrest you.
At the time Dean suggested to use sections, Mamash use the second category tag as a language tag. Check the thread for more info. Rogersm on this same thread has done a pretty good job of summing up the different approach to content localization.
I have not come accross this problem yet so I don’t know which way I would go (section or category). Anyway, you’d have to use conditionnals (except if you duplicate the whole structure in two subdomains with two txp installs… clumsy).
Category conditionnals plugins can be found easily on textpattern.org.
You have more option than you realize :
For section, check ob1_if_section and mdm_if_section
Hope this helps !
Would be nice to have something akin to the system of MediaWiki…
Last edited by davidm (2005-05-05 00:54:48)
.: Retired :.
Offline
#6 2005-05-05 14:23:05
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Bilingual web site
Thank you davidm, I didn’t know the ptv_if plugin, might be something… I’m planning to redo with Textpattern another site that now has only static html pages in three languages, but I’m postponing it until I really have found a good method. I’m adding your post to my personal ‘multi lingual site bookmarks’ ;)
Last edited by doggiez (2005-05-05 14:23:26)
Offline
#7 2005-05-05 16:30:13
- marios
- Archived Plugin Author
- Registered: 2005-03-12
- Posts: 1,253
Re: Bilingual web site
I took a look at the site, but my problem is , that I can not find the link where you switch back and forth between the two languages.
Allso, I am not getting clean URL’s.(That is something that I try to figure out allso with a couple of plugins, and trying to find a workaround for non ASCII carracters in pagetiles and textpattern URLS)
⌃ ⇧ < ⎋ ⌃ ⇧ >
Offline
#8 2005-05-08 21:54:23
- nytram
- New Member
- Registered: 2005-05-02
- Posts: 4
Re: Bilingual web site
davidm wrote:
The problem of multi-lingual website has already been brought up here and also here. Might interrest you.
At the time Dean suggested to use sections, Mamash use the second category tag as a language tag. Check the thread for more info. Rogersm on this same thread has done a pretty good job of summing up the different approach to content localization.
Thanks very much for the second link. As you say there is some interesting stuff in here. Since there is almost a year since the last post does anyone have any up to date info on this? It’s a shame that the suggestions weren’t implemented…
I have not come accross this problem yet so I don’t know which way I would go (section or category). Anyway, you’d have to use conditionnals (except if you duplicate the whole structure in two subdomains with two txp installs… clumsy).
The category approach seems perfect except that I cannot find a plugin (have looked at all the above) that will retrieve the category of a single article page. This (as far as I can see) makes it impossible to set the navigation elements to the correct language.
Sections aren’t much better. I have already made use of sections for their intended purpose… and there is a bijection between articles and sections. I am thinking that the easiest (but not so elegant) way to get round this is simply to have section names that also include the language – e.g. newseng and newscym. Then the
ob1_if_section plugin will be very useful.
Before I go ahead and implement this, any last minute brain waves? I’ll let you know how I get on in any case.
Would be nice to have something akin to the system of MediaWiki…
quite!
doggiez – thanks for your interest. Any thoughts on the sections idea?
Offline
#9 2005-05-09 05:06:24
- wazdog
- Archived Plugin Author
- From: Japan
- Registered: 2004-05-26
- Posts: 11
Re: Bilingual web site
I’ve got a fully-working site up, multilingual, using sections for languages, and categories for organization.
I’ve abstracted out a lot of the presentation code, so things are very flexible for the user I’m designing it for. He’ll be able to add pages without screwing too much up (hopefully).
It has taken a lot of work to get there, and I ran into a few big issues I had to solve.
I’ll post a write-up next weekend, as I’m in the final stages of launch.
(p.s. The initial ideas and setup were outlined by mamash, but I took a little different route than he did in regards to creating navigation menus, which seems to be one of the hardest aspects.)
-j
Offline
#10 2005-05-09 13:45:35
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Bilingual web site
That sounds very interesting wazdog, I’ll look forward to your write-up! Making it easy for the user to add pages is exactly what I want to do.
Offline
#11 2005-05-09 18:38:19
- marios
- Archived Plugin Author
- Registered: 2005-03-12
- Posts: 1,253
Re: Bilingual web site
> nytram wrote:
> davidm wrote:
The problem of multi-lingual website has already been brought up here and also here. Might interrest you.
At the time Dean suggested to use sections, Mamash use the second category tag as a language tag. Check the thread for more info. Rogersm on this same thread has done a pretty good job of summing up the different approach to content localization.
Thanks very much for the second link. As you say there is some interesting stuff in here. Since there is almost a year since the last post does anyone have any up to date info on this? It’s a shame that the suggestions weren’t implemented…
I have not come accross this problem yet so I don’t know which way I would go (section or category). Anyway, you’d have to use conditionnals (except if you duplicate the whole structure in two subdomains with two txp installs… clumsy).
The category approach seems perfect except that I cannot find a plugin (have looked at all the above) that will retrieve the category of a single article page. This (as far as I can see) makes it impossible to set the navigation elements to the correct language.
Sections aren’t much better. I have already made use of sections for their intended purpose… and there is a bijection between articles and sections. I am thinking that the easiest (but not so elegant) way to get round this is simply to have section names that also include the language – e.g. newseng and newscym. Then the
ob1_if_section plugin will be very useful.
Before I go ahead and implement this, any last minute brain waves? I’ll let you know how I get on in any case.
Would be nice to have something akin to the system of MediaWiki…
quite!
doggiez – thanks for your interest. Any thoughts on the sections idea?
That seems true , and I am thinking at some point to get all the stuff , that I’d collected that should be considered for multilingual sites
in to Textbook, for now I’m pretty much in research phase.
(What I am mostly trying to figure out is how to deal with non ASCII carracters , which is important especially if you combine latin and non latin languages)
regards, marios
⌃ ⇧ < ⎋ ⌃ ⇧ >
Offline
Re: Bilingual web site
I too looked for a solution to this for a site with equal (duplicate) content in two languages (as opposed to a mixture of different language articles). Rather than mirroring textpattern installations I set up sections with language prefixes, i.e. for 6 menu buttons there are 2×6 = 12 sections. Originally I wanted to do this with en/ and de/ which worked in RC1 but no more in RC3. Now all the Sections have either “de-” or “en-” in front of them and use different page templates to serve the right menu.
To get the menu to autogenerate but without the language prefix, as well as to convert German dumbed-down section names back to normal display with Umlauts I modified rdt_dynamenu to add the flag languageprefix. That works for German where the dumbing-down is reversible but not for all languages i.e. French. I posted some more details of the mods in this thread . I must say it is a workaround rather than a solution. This problem may be solved after changeset 326 (see that thread) but not tried it yet. Otherwise there is the section alias plug-in.
TXP Builders – finely-crafted code, design and txp
Offline