Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-07-19 19:10:19

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

bi-lingual options with textpattern

what are they.

i have a few personal sites id like to make bi-lingual.
Any good examples, plugins or articles out there for me to research?

I did a site like this before and i had the help of a txp dev.
We used a varialble to determine what language should be displayed, there were two. like this:

<txp:if_individual_article>
<txp:article_image />
<txp:else />
<txp:chs_if_urlvar var=“language” value=“irish”>
<txp:article_custom id=“105” form=“single” />
<txp:else />
<txp:article_custom id=“45” form=“single” />
</txp:chs_if_urlvar>
</txp:if_individual_article>


its a bad hen that wont scratch itself.
photogallery

Offline

#2 2008-07-19 19:34:55

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: bi-lingual options with textpattern

You need: http://forum.textpattern.com/viewtopic.php?id=20692

Offline

#3 2008-07-19 23:12:31

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

Re: bi-lingual options with textpattern

cheers


its a bad hen that wont scratch itself.
photogallery

Offline

#4 2008-07-20 00:04:23

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: bi-lingual options with textpattern

hi kvnmcwebn,

I’ve done an approach to a bilingual site without using MLP (because I couldn’t install it ‘cos the server had MySQL < 4.1). The approach implied:
  • languages were TxP sections (/en/, /es/)
  • and the articles were the sections
  • and a custom field to put the ID of the corresponding rendition of an article in another language.
  • the site is pretty static and simple
  • so, section navigation (remember, sections = txp articles) was manually done.

The lang selector used asy_wondertag plug-in to do the magic of linking to the corresponding article in another language. Like this:

<ul id="langSelector">
<txp:if_article_list>
        <li id="englishLang"><a href="/en/">English</a></li>
        <li id="spanishLang"><a href="/es/">Español</a></li>
</txp:if_article_list>
<txp:if_individual_article>
    <txp:if_section name="en">
        <li id="englishLang" class="active"><txp:permlink>English</txp:permlink></li>
        <li id="spanishLang">        <txp:asy_wondertag><txp:permlink id="<txp:custom_field name="spanish" />">Español</txp:permlink></txp:asy_wondertag></li>
    </txp:if_section>  
    <txp:if_section name="es">
        <li id="englishLang"><txp:asy_wondertag><txp:permlink id="<txp:custom_field name="english" />">English</txp:permlink></txp:asy_wondertag></li>
        <li id="spanishLang" class="active"><txp:permlink>Español</txp:permlink></li>
    </txp:if_section>  
</txp:if_individual_article>
</ul>

So, if the site you are planning is very very simple, this is another possibility to make it bi-lingual.
But, in any case, if you can go with the MLP, you won’t regret.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#5 2008-07-24 13:53:11

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

Re: bi-lingual options with textpattern

Thanks manaqui,
actually my host only has mySql 4.1.11 as well…..ahh..


its a bad hen that wont scratch itself.
photogallery

Offline

#6 2008-07-24 13:54:44

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

Re: bi-lingual options with textpattern

Manaqui
can you give me the url of that site?
-best
kevin


its a bad hen that wont scratch itself.
photogallery

Offline

Board footer

Powered by FluxBB