Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1216 2009-03-16 01:19:02

dl33
Member
Registered: 2006-06-17
Posts: 192
Website

Re: MLP - The Multi-Lingual Publishing Pack

I asked this before, but the problem has changed ever so slightly: I have a website which is is translated into three languages. One section—the weblog— will only be available in English, as I’ll translate myself crazy otherwise.

The problem is that with the MLP I would need to clone the articles and not translate them. However, this will then not show a unified comment thread for what is essentially the same article.

Alternatively, I can switch the MLP rewrite for that particular section, however, that only changes the URL rewrite but effectively still operates the site in the chosen language: No articles would be shown in the weblog, which is far from ideal as well.

Is there a way of pulling up a comment thread from another article and post to that one instead or can I somehow tell the mlp to always show the english language articles in one particular section?

Offline

#1217 2009-03-18 14:54:45

dl33
Member
Registered: 2006-06-17
Posts: 192
Website

Re: MLP - The Multi-Lingual Publishing Pack

@maniqui: From the other thread

if lang = en
    ...some comment form tags...
else
    <txp:article_custom id='<txp:custom_field name="original_article_id" />'>
    ...some comment form tags...
    </txp:article_custom>

Tried your code above: The result is that nothing within the article_custom tags is listed, as if the id from the custom field didn’t exist.

I think that the problem seems to be that the MLP also tries to translate article_custom fields. I couldn’t find any info on this on the mlp site/thread…

Offline

#1218 2009-03-18 19:02:20

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

Re: MLP - The Multi-Lingual Publishing Pack

@dl33,

before trying with the custom field, have you tried by just hardcoding the id directly in txp:article_custom?
If that works, at least we’re going the right way.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#1219 2009-03-18 19:08:55

dl33
Member
Registered: 2006-06-17
Posts: 192
Website

Re: MLP - The Multi-Lingual Publishing Pack

Yes, tried hardcoding it. Textpattern spits out nothing. Also had a look at the debug code… it just seems to ignore the bit between the article_custom tags.

Offline

#1220 2009-03-18 19:12:12

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

Re: MLP - The Multi-Lingual Publishing Pack

Where could I see the debug code?
Also, are you using 4.0.7+? (just to know if you can use article_custom as container tags).


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#1221 2009-03-18 19:36:16

dl33
Member
Registered: 2006-06-17
Posts: 192
Website

Re: MLP - The Multi-Lingual Publishing Pack

I am using 4.07.

At the moment I have this inside a l10n:if_lang:

<txp:article_custom id='<txp:custom_field name="weblog_en_id" />'>
	<txp:if_comments>
		<h3 id="comments"><span>Kommentare</span></h3>
		<txp:comments class="comments" wraptag="ol"/>
	</txp:if_comments>
	<txp:comments_form form="comment_form" msgstyle="textarea" class="comment_form" />
</txp:article_custom>

which produces this: (but nothing visible)

<txp:article_custom id='<txp:custom_field name="weblog_en_id" />'>
	[attribute 'id']
	<txp:custom_field name="weblog_en_id" />
	[/attribute]
	[SQL (0.00042200088501): select *, unix_timestamp(Posted) as uPosted, unix_timestamp(Expires) as uExpires, unix_timestamp(LastMod) as uLastMod from squawk_l10n_txp_de_de as l10n_txp_de_de where 1=1 and Status >= 4 and Posted <= now() and (now() <= Expires or Expires = 0) and ID IN (127) order by Posted desc limit 0, 10]
</txp:article_custom>

Offline

#1222 2009-03-23 13:33:03

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: MLP - The Multi-Lingual Publishing Pack

Have some problems with moving to another hosting – site doesn’t load at all. Even admin-side doesn’t work…

  1. If i try to run in phpmyadmin sql’s, which are marked “as bad”, in phpmyadmin i get normal output…

Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#1223 2009-03-23 17:10:22

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

Re: MLP - The Multi-Lingual Publishing Pack

I hope someone with more MySQL knowledge than I will be able to help you… it just looks scary to me ;) But a couple of remarks:

  • did you just move your files to the new server, or did you do a fresh (Txp/MLP) install? Either way, have you tried if using the other method made a difference?
  • MySQL 5.1.16- beta, is that wise?

Offline

#1224 2009-03-23 17:42:46

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: MLP - The Multi-Lingual Publishing Pack

Els wrote:

did you just move your files to the new server, or did you do a fresh (Txp/MLP) install? Either way, have you tried if using the other method made a difference?

Tables where imported from working development server. Tables in mysql are 100% dublicates of tables in development server (of course, site’s paths and url where edited)…

MySQL 5.1.16- beta, is that wise?

This is Life :) we get what we are given :) I can only switch back to php4 and get same errors..

p.s. BTW – is MLP 0.9.9 there php4 capable?


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#1225 2009-03-24 00:12:24

MoonTrace
New Member
Registered: 2009-03-23
Posts: 4

Re: MLP - The Multi-Lingual Publishing Pack

maded wrote:

….
Add the per-language article tables…
1. Add the Italiano [l10n_txp_it_it] table : Failed
2. Add the English [l10n_txp_en_us] table : Failed
Insert MLP tags into pages : Done
….
I can create them manually?
Where I can find the structure base for the tables?
tnks

The problem is in MySQL setup. Default engine type is set to InnoDB, which does not have fulltext search.
The actual query is in textpattern\lib\l10n_admin_classes.php file, lines 1521-1523.

So the query could be for en-gb:

create table `l10n_txp_en_gb` 
(PRIMARY KEY  (`ID`), KEY `categories_idx` (`Category1`(10),`Category2`(10)), KEY `Posted` (`Posted`), FULLTEXT KEY `searching` (`Title`,`Body`)) 
ENGINE=MyISAM 
select * from `textpattern` where l10n_lang='en_gb'

Offline

#1226 2009-03-24 20:15:48

MoonTrace
New Member
Registered: 2009-03-23
Posts: 4

Re: MLP - The Multi-Lingual Publishing Pack

Hi, I am new to textpattern and MPL. I have couple of questions:

  • How can I translate URLs of sections? I want to have /en/news/ and /cs/novinky/ not /cs/news/.
  • I wish I could have all language links always available, but if there is no rendition for particular language I would like the lang-link to point to a parent section. How to achieve that?

Thanks you!

Offline

#1227 2009-03-24 21:08:13

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

Re: MLP - The Multi-Lingual Publishing Pack

Hi MoonTrace, welcome to Txp and MLP!

How can I translate URLs of sections? I want to have /en/news/ and /cs/novinky/ not /cs/news/.

Unfortunately that is not possible at the moment. See this post by Steve, #009.
If you don’t really need the /section/title URLs, a workaround is to use the /title permanent link mode. I’m only using this workaround myself on one, very simple, site. As soon as you need a multi-level structure, and/or categories, it’s not really an option.

I wish I could have all language links always available, but if there is no rendition for particular language I would like the lang-link to point to a parent section. How to achieve that?

Interesting question! :) It’s not possible ‘out of the box’ as far as I know, but there might be a way to achieve it using smd_if. Right now I don’t have time to look into it, but roughly I’m thinking about not displaying the language link if there is no rendition, and use smd_if to test for the presence of a language in the language list, and if not, add a link to the section page. Something like that…

Last edited by els (2009-03-24 21:10:03)

Offline

#1228 2009-03-24 21:11:14

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: MLP - The Multi-Lingual Publishing Pack

Els wrote

I’m thinking about not displaying the language link if there is no rendition, and use smd_if to test for the presence of a language link, and if not, add a link to the section page. Something like that…

I thought about it and have done this with txp:variable and smd_if

p.s. Els, did you see my mail? Can you share with last MLP-friendly txp install?

Last edited by the_ghost (2009-03-24 21:13:06)


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#1229 2009-03-24 21:14:17

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

Re: MLP - The Multi-Lingual Publishing Pack

the_ghost wrote:

Els, did you see my mail?

Yes, I replied, didn’t you get my mail?

Offline

#1230 2009-03-25 00:54:46

graeme
Plugin Author
Registered: 2004-06-21
Posts: 337
Website

Re: MLP - The Multi-Lingual Publishing Pack

maded wrote:

I can create them manually?
Where I can find the structure base for the tables?

The structure should be identical to the main textpattern table. Those steps might of failed due to not having the correct MySQL permissions. Are you able to check weather you’ve got the CREATE permission?

Offline

Board footer

Powered by FluxBB