Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1591 2010-11-05 15:19:01

lythande
Member
Registered: 2009-09-08
Posts: 202
Website

Re: MLP - The Multi-Lingual Publishing Pack

Els schrieb:

Els wrote:

I think you can safely ignore this warning; I’ve been using cross-section renditions on a site and apart from the warning I haven’t seen any problems with it.

much thanks! :-)

Lythande wrote:
ouch, yes. Ive a problem with l10n_lang_list.
if the english section active, then I can’t switch to the german section “arbeiten”, it’s switch to the (wrong) german section “works”.

Els wrote:
Do you mean when on a section page? If you don’t have too many sections, you might consider hardcoded links to the other languages’ section pages.
If there is a problem on individual article pages as well, then maybe this post can help you.

I mean both, for sections and for individual article pages. I have look to your link. Ive now install plugin smd_query, but not sure, I need the plugin rah_replace? And where I can place the code? (directly to the space, where being normally the code l10n_lang_list?)

Offline

#1592 2010-11-05 15:25:33

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: MLP - The Multi-Lingual Publishing Pack

lythande wrote:

I need the plugin rah_replace?

Ah yes, I forgot rah_replace ;) It’s only to change for example ‘en-gb’ to ‘en_gb’, to get the correct table names.

And where I can place the code? (directly to the space, where being normally the code l10n_lang_list?)

Yes.

You will probably need to change the code a little bit to fit your own needs (languages, URL scheme).

Offline

#1593 2010-11-05 16:29:51

lythande
Member
Registered: 2009-09-08
Posts: 202
Website

Re: MLP - The Multi-Lingual Publishing Pack

Now its work, much thanks! :-)

Offline

#1594 2010-11-05 19:23:03

lythande
Member
Registered: 2009-09-08
Posts: 202
Website

Re: MLP - The Multi-Lingual Publishing Pack

mmh, its very strange. now it’s not working and get an error:
after coding not only for if_individual_article, coding for if_section with hardcoding (and then back, as I see thats not good work)
I think not, that Ive have changing anythings in the first code for if_individual_article and the table exist in the mySQL. but get still the error for if_section (but all for this are deleted).

Tag error:  <txp:smd_query column="l10n_group" table='l10n_txp_<txp:rah_replace from="-" to="_">
   <txp:l10n_get_lang type="long" /></txp:rah_replace>' where='ID=<txp:article_id />'> 
   ->  Textpattern Warning: Table 'dbnumber.txp1l10n_txp_en_gb' doesn't exist
   select l10n_group from `txp1l10n_txp_en_gb` as `l10n_txp_en_gb` where ID=58 
   textpattern/lib/txplib_db.php:246 getRows()  on line 113

Edit: Ive see: in my mySQL is only the table “txp1l10n_txp_en_gb” but not with the “dbnumber.”, which is only the whole database-name, but not in the table-name.

Here my code:

  <txp:smd_query column="l10n_group" table='l10n_txp_<txp:rah_replace from="-" to="_">
   <txp:l10n_get_lang type="long" /></txp:rah_replace>' where='ID=<txp:article_id />'>
   <txp:variable name="group" value="{l10n_group}" />
  </txp:smd_query>

last Edit: mmh, Ive making a complet new code, now works again very good.

Last edited by lythande (2010-11-05 19:49:10)

Offline

#1595 2010-11-05 19:47:14

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: MLP - The Multi-Lingual Publishing Pack

databasename.tablename is to be expected there.

But what I see in the error message is a 1 where there should be an underscore: txp1l10n_en_gb should be txp_l10n_en_gb. Maybe there is a typo in your code somewhere?

Offline

#1596 2010-11-05 20:32:59

lythande
Member
Registered: 2009-09-08
Posts: 202
Website

Re: MLP - The Multi-Lingual Publishing Pack

Ive using a table-prefix “txp1” without spaces to table-names.

Its very strange, but as I get new form with again new code from your link and again switch to my needed code, Ive no problems again.
Maybe as I making separately <txp:if_section>-hardcoding for the sections before the lines for if_individual_article, textpattern becomes confused.

Now Ive making a little bit another code, at first if_individual_article, then inside if_individual_article after <txp:else /> the hardcode for each section (is only 5 sections) with l10n_if_lang and if_section. now works clearly and textpattern dont confused. puuh. :-)

Last edited by lythande (2010-11-05 20:34:42)

Offline

#1597 2010-11-05 20:38:50

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: MLP - The Multi-Lingual Publishing Pack

lythande wrote:

Ive using a table-prefix “txp1” without spaces to table-names.

Ah, I see. Though txp seems to detect if you’re using a prefix, even if you didn’t add it in the code, it might be wise to change the code, just in case ;)
So in all places where you have table='l10n_txp_etcetera' change it to table='txp1l10n_txp_etcetera'.

(Edit: no, not true. See post below!)

Last edited by els (2010-11-06 15:42:24)

Offline

#1598 2010-11-06 08:50:30

lythande
Member
Registered: 2009-09-08
Posts: 202
Website

Re: MLP - The Multi-Lingual Publishing Pack

Els schrieb:

So in all places where you have table='l10n_txp_etcetera' change it to table='txp1l10n_txp_etcetera'.

Sorry Els, thats not correct. Ive do it, but it’s make an error, because textpattern-installation add the prefix himself. You dont need add the prefix to table='l10n_txp_etcetera'. :-)

Offline

#1599 2010-11-06 10:45:10

lythande
Member
Registered: 2009-09-08
Posts: 202
Website

Re: MLP - The Multi-Lingual Publishing Pack

Now Ive the next problems. I using own rss-feed with this schema Customising rss feed

So now I think, here I should using the same code how there with specially code for excerpts and body?

Offline

#1600 2010-11-06 15:40:21

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: MLP - The Multi-Lingual Publishing Pack

lythande wrote:

Sorry Els, thats not correct. Ive do it, but it’s make an error, because textpattern-installation add the prefix himself. You dont need add the prefix to table='l10n_txp_etcetera'. :-)

Ah, I didn’t realize that, sorry for the misleading information. I remember I intended to change this on the site where I was using this code (I even thought – incorrectly – I actually changed it), but now I’m glad that I completely forgot all about it ;)

Offline

#1601 2010-11-06 15:43:47

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: MLP - The Multi-Lingual Publishing Pack

lythande wrote:

Now Ive the next problems. I using own rss-feed with this schema Customising rss feed

So now I think, here I should using the same code how there with specially code for excerpts and body?

I suppose you can try that. I have never used rss feeds with MLP, so I don’t think I can help you here.

Last edited by els (2010-11-06 15:43:59)

Offline

#1602 2010-11-08 14:38:42

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

Re: MLP - The Multi-Lingual Publishing Pack

Hmm.

This works, if i select either language it will refresh to the appropriate rendition.
bc. <txp:article_custom form=“blog_entry” section=“Animals” />

But there are multiple articles place a landing article in my sections and this doesn’t work:

<txp:if_individual_article> 
 <txp:article_custom  form="blog_entry" section="Animals"  />
<txp:else /> <txp:article_custom  form="blog_entry" section="Animals" id="12" />
</txp:if_individual_article>

Can’t figure it out.
-best
Kevin


its a bad hen that wont scratch itself.
photogallery

Offline

#1603 2010-11-08 15:28:50

lythande
Member
Registered: 2009-09-08
Posts: 202
Website

Re: MLP - The Multi-Lingual Publishing Pack

kvnmcwebn schrieb:
But there are multiple articles place a landing article in my sections and this doesn’t work:

you can do this, if you say:
if language one, then show this article-number,
if language two, then show other article-number

use: <l10n_if_language lang="de">

Offline

#1604 2010-11-08 15:31:28

lythande
Member
Registered: 2009-09-08
Posts: 202
Website

Re: MLP - The Multi-Lingual Publishing Pack

Els schrieb:

I suppose you can try that. I have never used rss feeds with MLP, so I don’t think I can help you here.

I try it, not ready, but its look good :-)

Offline

#1605 2010-11-08 15:51:10

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

Re: MLP - The Multi-Lingual Publishing Pack

thank you very much.


its a bad hen that wont scratch itself.
photogallery

Offline

Board footer

Powered by FluxBB