Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#733 2008-05-08 21:16:52

milkshake
Member
From: Linz, Austria
Registered: 2007-06-24
Posts: 80
Website

Re: MLP - The Multi-Lingual Publishing Pack

It seems only users with > managing editor (2) level privs can make clones. Would be nice to be able to adjust this.

Offline

#734 2008-05-09 02:23:01

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: MLP - The Multi-Lingual Publishing Pack

milkshake wrote:

It seems only users with > managing editor (2) level privs can make clones. Would be nice to be able to adjust this.

Yes, that’s right. If you want to change this, edit the l10n plugin and look for the following lines…

if( @txpinterface === 'admin' )
	{
	add_privs( 'l10n.clone' 	, '1,2' );

Just add the user level(s) you want to that comma separated list on the last line shown above and then save your edit.


Steve

Offline

#735 2008-05-13 08:41:55

milkshake
Member
From: Linz, Austria
Registered: 2007-06-24
Posts: 80
Website

Re: MLP - The Multi-Lingual Publishing Pack

Thanks, I should have looked a little more

Offline

#736 2008-05-14 23:14:53

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

Re: MLP - The Multi-Lingual Publishing Pack

Happy to see you back, net-carver.
Now, I can ask again for some features :)

1. <txp:l10n_if_article_lang> and <txp:l10n_get_article_lang />

I’ve already requested this here. I put an example on that post, and here is a similar one:
I’m having an issue with Postmaster (I will post in that plug-in thread too):
I send notifications of new articles posted on a TxP site.
The e-mail content is rendered using a TxP form, where you can put built-in txp tags and also tags from Postmaster plug-in.
In those e-mails I want to put the link to the published new article. To achieve this, I can use both <txp:permlink /> or <txp:bab_pm_data display="Link" /> to output the article URL.

The problem is: the output of both tags doesn’t include the language chunk for the URL.
So, if visitors clicks on the link (on the received e-mail), they go to a 404 page.

Confession: this isn’t totally true. This only happens if the link points to an article that belongs to a language that isn’t the default one. In other words (example):

http:///www.site.com/section/english-article-url-title <- although the lang chunk (/en/) is missing, this URL works on a MLP site only for an article url-titled as english-article-url-title and if it belongs to the default/main language.

http:///www.site.com/section/spanish-article-url-title <- this doesn’t work (goes to 404). It’s missing the (/es/) part of the URL, and spanish isn’t the main language.
Just another little confession: that URL will work only if the site visitor has already visited the site and have a cookie with the language set to spanish. But we can’t expect that someone clicking on an e-mail link has already visited our site before and the cookie is still there.

So, the requested tags (particularly, <txp:l10n_get_article_lang />) will let us to manually create URLs on page/forms (particularly, on article forms), like this:
<txp:site_url /><txp:l10n_get_article_lang /><txp:article_url_title />

2. Can renditions (for a same article) belong to different sections?

I should test if this is possible. Do you remember the already rejected request (to have section names translated)?

I was thinking: what if I create two (or more) sections, one for each language, and assign a rendition to its corresponding section/language?

The first problem I see on this approach is: how to “connect” one translated article in a section to the corresponding one in another language/section.
Example: how to link http://www.site.com/en/news/net-carver-is-back to http://www.site.com/es/noticias/net-carver-ha-vuelto

Maybe here is where MLP could do the magic: to have some place on MLP where each section is matched with is correspondent section in other language. For example: sections “news” (english) matches section “noticias” (spanish).
Again, this doesn’t means MLP has to tie a section with a particular language. This is up to the user to follow its own convention about where (which section) to publish a particular article.

I hope this makes sense.

BTW, I’ve made an approach to a TxP bilingual (but it could have been multi) site without using MLP. It was a simple site, few content, and using some txp built-in magic and some plug-ins, I’ve created something acceptable. I will write a tutorial soon.

Of course, nothing beats MLP on creating true (and complex, if needed) multi-lingual sites with TxP.

Last edited by maniqui (2008-05-14 23:15:53)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#737 2008-05-26 11:09:19

ultramega
Member
Registered: 2006-02-26
Posts: 221

Re: MLP - The Multi-Lingual Publishing Pack

How upgrading TXP-itself (to the latest 4.06 version) is going to affect MLP, if any? And what would be the best way update, when having several languages and looooots of translated articles, snippets and so on? I just asked about upgrade in general here.

Offline

#738 2008-05-26 11:39:20

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

Re: MLP - The Multi-Lingual Publishing Pack

I’ve upgraded a MLP-powered site from 4.05 to 4.06 without any hassle.
Look on the last 5 or 10 pages of this thread for a “patch” (not really needed) I posted of the txplib_db.php file. It has minor differences, but I think ruud or netcarver stated somewhere that this differences won’t bring any problem for a MLP site.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#739 2008-05-26 14:07:24

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

Re: MLP - The Multi-Lingual Publishing Pack

After installing and activating zem_contact_lang-mlp I’m getting:

Fatal error: Cannot redeclare zem_contact_gtxt() (previously declared in /users/home/domains/site.com/web/public/textpattern/lib/txplib_misc.php(574) : eval()’d code:2) in /users/home/domains/site.com/web/public/textpattern/lib/txplib_misc.php(574) : eval()’d code on line 75

Anyone know where I’ve done wrong, I’m using 4.06?

Best wishes
Lee

Offline

#740 2008-05-26 14:14:33

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: MLP - The Multi-Lingual Publishing Pack

You should remove zem_contact_lang if you have zem_contact_lang_mlp installed.

Offline

#741 2008-05-26 14:17:42

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

Re: MLP - The Multi-Lingual Publishing Pack

Thank you, I didn’t realise that.

Offline

#742 2008-05-26 16:35:36

michaelb
Member
From: London, UK
Registered: 2008-04-02
Posts: 21

Re: MLP - The Multi-Lingual Publishing Pack

Lee, do you have zem_contact_lang activated as well? If so, you should turn it off. Sorry – just noticed this has already been answered.

Last edited by michaelb (2008-05-26 16:37:18)

Offline

#743 2008-05-26 16:38:49

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

Re: MLP - The Multi-Lingual Publishing Pack

Thanks Michael.

Offline

#744 2008-06-06 14:30:56

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

Re: MLP - The Multi-Lingual Publishing Pack

Hi net-carver, are you there?
Don’t be shy!
We all know you are back at forums ;), and taking care of other little neat plug-ins, like the sed_section_fields and helping on jmd_sitemap…

Have you read graeme’s and wet’s messages [1, 2 about making things easier for integrating MLP? :)

maniqui wrote:

2. Can renditions (for a same article) belong to different sections?

I should test if this is possible. Do you remember the already rejected request (to have section names translated)?

I was thinking: what if I create two (or more) sections, one for each language, and assign a rendition to its corresponding section/language?

The first problem I see on this approach is: how to “connect” one translated article in a section to the corresponding one in another language/section.
Example: how to link http://www.site.com/en/news/net-carver-is-back to http://www.site.com/es/noticias/net-carver-ha-vuelto

I have tested this idea and it worked :)
You can have an article published in a section and its translated version published to another section and both are cross-linked (thru the mlp lang switcher) when in individual article context.
The only “problem” is that, when in article list context, the lang switcher doesn’t link to this other “unrelated” section. In other words, the lang switcher works as expected, that is, as it works on any MLP site: it links to /another-lang/section_name/ for the current section, and not to /another-lang/another_section_with_translated_name/.

Example:
Lang switcher links on an individual article context for an english article (testing) on a section (/lab/) which has its spanish rendition (testeando) on another section (/laboratorio/)

http://www.example.com/en/lab/testing links to http://www.example.com/es/laboratorio/testeando (thru lang switcher on individual article context)
:D

http://www.example.com/en/lab/ links to http://www.example.com/es/lab/ (thru lang switcher on article list context) instead of http://www.example.com/es/laboratorio/
:(

But, probably, this latest “issue” is easily “workaround-able” by doing some hand/hard-coding.

maniqui wrote:

Maybe here is where MLP could do the magic: to have some place on MLP where each section is matched with is correspondent section in other language. For example: sections “news” (english) matches (is linked to) section “noticias” (spanish).
Again, this doesn’t means MLP has to tie a section to a particular language. This is up to the user to follow its own convention about where (which section) to publish a particular article.

Because linking renditions (on individual article context) in different sections worked, this doesn’t seem to be totally necessary (although it is desirable) at a first look. But again, the lang switcher needs to be manually created for article lists context.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB