Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#736 2008-05-14 23:14:53
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)
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
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.
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
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
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 linkhttp://www.site.com/en/news/net-carver-is-backtohttp://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.
Offline
#745 2008-06-07 17:25:28
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: MLP - The Multi-Lingual Publishing Pack
Julián
Hello! Thank you for posting.
I’m not being shy — just busy. As you know I’m updating a few other plugins at the moment but am working on a site that uses the MLP Pack so I expect it will see some work soon.
Regards,
— Steve
Offline
#746 2008-06-11 16:17:50
- lee
- Member
- From: Normandy, France
- Registered: 2004-06-17
- Posts: 831
Re: MLP - The Multi-Lingual Publishing Pack
Hi Steve,
I’m using Gerhards custom field plugin, and have added 6 extra fields, along with MLP and I’m getting this error at the bottom of the write page when I save an article. Any ideas what the problem might be?
Warning: Column count doesn’t match value count at row 1 REPLACE INTO l10n_txp_fr_fr SELECT * FROM textpattern WHERE textpattern.ID=‘7’ LIMIT 1 in /users/home/sites/domains/auvergnepropertyshop.com/web/public/textpattern/lib/txplib_db.php on line 117
Thanks very much
Lee
Offline
#747 2008-06-11 16:48:04
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: MLP - The Multi-Lingual Publishing Pack
Lee
sounds like there is a mismatch between the number of columns in textpattern and l10n_txp_fr_fr. If you have access to phpMyAdmin, can you take a look at the table definitions. I don’t know how Gerhards plugin handles extra fields above the limit but it may be that something’s not been copied over to the l10n_txp_fr_fr table properly.
Can you manually check that the fieldnames in the two tables match. Feel free to email me a summary of the fields from both tables and I’ll look into the problem.
Many thanks,
— Steve
Offline
#748 2008-06-11 18:15:41
- lee
- Member
- From: Normandy, France
- Registered: 2004-06-17
- Posts: 831
Re: MLP - The Multi-Lingual Publishing Pack
Hi Steve, you’re right, the textpattern table has custom_1 to custom_16 and the l10n_txp_fr_fr and l10n_txp_en_gb have custom_1 to custom_10. I’m in a pickle now, what to do?
Many thanks
-Lee
Offline
#749 2008-06-15 14:39:27
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: MLP - The Multi-Lingual Publishing Pack
All
I’ve worked out a fix for Lee’s problem above by observing what glz_cf is doing to the textpattern table structure and for regenerating the per-language txp tables whenever it changes.
This will be in the next MLP release.
— Steve
Offline
#750 2008-06-15 14:59:53
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: MLP - The Multi-Lingual Publishing Pack
Steve,
that’s great.
To tell the truth I never used the MLP pack till now but I think I’m gonna need it soon and – making an extensive use of glz_custom (obviously toghether the mighy sed_section_fields) – I was a little hesitant.
So, for the millionth time , thank you
Offline