Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-10-14 11:30:23

toni1
Member
Registered: 2006-04-21
Posts: 14

Site versions... what is the easiest way?

I have a website in English, it resembles very much a blog, but it also has other elements.
Well, the question is the following. I want to make a Spanish version of the site. What is the easiest way to do it, so that the structure is the same, just the text changes?
Thank you

Offline

#2 2006-10-14 22:26:16

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,726
Website

Re: Site versions... what is the easiest way?

Do a search for “multilingual” and you’ll find a number of threads with different approaches.

A quick run-down of some alternatives: if your site’s structure is very simple you can make a section per language e.g. /en and /es and then write your language articles in the respective sections – use categories to organise the rest of your site.

If it’s more complex and you want the same structure for each section, you might be better giving your existing section names a language prefix and duplicating the section structure, e.g. /blog becomes /en-blog and /es-blog (and you then have different menu navigation for the section of the relevant language). This is how I’ve done it in the past. You end up with different page templates and forms for each language.

If you have a mixture of both languages, then people have tried various ways of going about – most recently samisdat.org (again use the search – there’s a thread on it) worked out a way of having some articles in either language and some in both languages.

And the version with possibly the most potential, but still in development, is this plug-in by graeme and net-carver.


TXP Builders – finely-crafted code, design and txp

Offline

#3 2006-10-15 08:11:27

mazso
Member
Registered: 2005-09-29
Posts: 25

Re: Site versions... what is the easiest way?

You could also create two categories (in your case “es” and “en”). The categories you can use, to filter an language-specific elements one your pages like this:

<code>
<txp:if_category name=“es”>
Your spanish header, meta, navigation…
<txp:else />
Your english header, meta, navigation…
</txp:if_category>
</code>

To get your permlinks work properley just add the parameter:

<code>
<h2>
<a href=”<txp:permlink /><txp:if_category name=“es”>/?c=es
<txp:else />/?c=de</txp:if_category>” >
<txp:title />
</a>
</h2>
<txp:body />
</code>

Your homepages will be www.your-domain/default/?c=en and www.your-domain/default/?c=es

If you wan’t to use the beginning-plugin take a look at this post

Mazso

Last edited by mazso (2006-10-15 08:23:06)

Offline

Board footer

Powered by FluxBB