Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#2329 2015-03-19 13:06:42

Manaus
Member
From: Turin, Italy
Registered: 2010-10-22
Posts: 251
Website

Re: MLP - The Multi-Lingual Publishing Pack

Since I can have a multilingual section title, is it possible to have also a multilingual section name? So that it appears contextual also in the url?

Thanks!

Offline

#2330 2015-03-19 14:43:05

Manaus
Member
From: Turin, Italy
Registered: 2010-10-22
Posts: 251
Website

Re: MLP - The Multi-Lingual Publishing Pack

And, how can I delete or reassign those articles that appear on the frontend but not in the admin?
Thanks

Offline

#2331 2016-01-13 15:01:07

Manaus
Member
From: Turin, Italy
Registered: 2010-10-22
Posts: 251
Website

Re: MLP - The Multi-Lingual Publishing Pack

Hello,
I have an article with ID 25, with 5 renditions. If I put this tag <txp:l10n_permlink articleid="25" /> in the page, I get always, whatever the lang value, a http://www.website.it/title-in-default-language, without language or localized title. Is this the correct behaviour?
Thanks

Edit: typo

Last edited by Manaus (2016-01-13 15:02:00)

Offline

#2332 2016-03-01 18:25:50

giampablo
Member
From: Italy
Registered: 2008-07-17
Posts: 86
Website

Re: MLP - The Multi-Lingual Publishing Pack

Ciao Manaus,
you get whatever is written in your Rendition Title URL (Write page, Meta > URL title). Let’s say your article ID 25 title is “Primo Articolo” the URL title will be “primo-articolo”. In the English article clone you will change the title to “First Article” and, on save, it should generate the URL title “first-article”. Do the same for each rendition. Or just cancel whatever is written in URL title field and save again. The url title will be automatically generated according to the article title.
So, with your tag you will get a http://www.website.it/primo-articolo in Italian and http://www.website.it/first-article in English. This should be the correct behavior.

Hope it helps

Offline

#2333 2016-03-01 18:37:02

giampablo
Member
From: Italy
Registered: 2008-07-17
Posts: 86
Website

Re: MLP - The Multi-Lingual Publishing Pack

On a page template, with the tag <txp:article id="12" /> I do not get any rendition.
Using instead <txp:article limit="1" offset="11" /> I get the correct rendition.

Is it a bug? Should I use a MLP tag? I’m missing something?
Please help.

Offline

#2334 2016-03-01 21:29:05

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

Re: MLP - The Multi-Lingual Publishing Pack

Ages ago ;)

I wrote #226192:

It’s not in the plugin help, but I think you need l10n_get_rendition_id:

<txp:article_custom id='<txp:l10n_get_rendition_id articleid="123" />' />

Does this help?

Offline

#2335 2016-03-01 22:10:56

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,269
Website GitHub

Re: MLP - The Multi-Lingual Publishing Pack

Els wrote #298093:

It’s not in the plugin help

Ack, it bloody well should be! I’ll try and remember to add that if it’s missing as I inch MLP towards working under 4.6.x.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#2336 2016-03-02 00:55:06

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

Re: MLP - The Multi-Lingual Publishing Pack

Bloke wrote #298097:

Ack, it bloody well should be! I’ll try and remember to add that if it’s missing as I inch MLP towards working under 4.6.x.

Thanks Stef! But is the behaviour Manaus described for the l10n_permlink tag intended? I’d think it ought to link to an article’s rendition, not to the article itself.

Offline

#2337 2016-03-02 09:57:13

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,269
Website GitHub

Re: MLP - The Multi-Lingual Publishing Pack

Els wrote #298099:

is the behaviour Manaus described for the l10n_permlink tag intended?

I’ve no idea! I guess not. It should probably do the same as your example above: be a shortcut for article_custom with a rendition ID. Maybe the tag broke somehow. When I get to the front-end tags, I’ll look at it.

The back-end seems to be mostly working OK now, it just looks damn ugly as all the class names and hooks have changed. I might commit what I have so far and work on the interface as a separate step. My guess is the JS won’t work right now so the snippets tab might be hit and miss.

Speaking of which, you (or anyone else) might be able to help me here. Snippets were invented before Textpacks were dreamed up, and I can’t help thinking that Textpacks are a better tool for the job. As well as being able to drop strings in situ for the current language from the server as a page is rendered, we also have an API to drop strings to the front-end now for use in sites via a javascript gTxt(). Thing is, I don’t quite know how to factor them into the MLP workflow. Any ideas?

I think using Textpacks would be a nice stepping stone towards a next generation multi-lingual experience: hopefully one that is not a hack, once a few other core changes are made in a later Txp version.

What would a good multi-lingual workflow involving Textpacks look like, to help migrate people away from snippets? Presumably some panel, like the current Snippets panel, to manage Textpack strings? I think that might actually be a broadly useful plugin in its own right, but I don’t want to get ahead of ourselves by tainting anyone’s ideas in that regard.

Or do snippets offer something above what a Textpack can deliver? If so, what?

All thoughts on this welcome, as it’s been playing on the back of my mind for a while now and I’m not a big enough user of MLP to know how the thing’s used in anger.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#2338 2016-03-02 14:08:17

giampablo
Member
From: Italy
Registered: 2008-07-17
Posts: 86
Website

Re: MLP - The Multi-Lingual Publishing Pack

Els wrote #298093:

Does this help?

Thanks Els. That is what I needed.
And, of course, this <txp:article id='<txp:l10n_get_rendition_id articleid="123" />' form="my form" /> works, as well.

It is a rather convoluted method, by the way.
An additional new tag <txp:l10n_rendition articleid="123" /> would be welcome.

Offline

#2339 2016-03-02 14:56:55

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,269
Website GitHub

Re: MLP - The Multi-Lingual Publishing Pack

giampablo wrote #298114:

An additional new tag <txp:l10n_rendition articleid="123" /> would be welcome.

Hehe, or get the l10n_permlink tag to work as intended! The documentation states:

l10n_permlink: Outputs the permlink to the rendition of the identified article that matches the language currently being used to browse the site.

Attribute articleid: Set this to the ID of the ARTICLE you with to link to. You can leave this empty in an article context (article form — or within an ‘if_individual_article’ tag) and it will use the current rendition’s article ID. Make sure you set this explicitly in an article-list context.

That sounds like it’s meant to do what you expected, yes? But maybe it’s not working now for some reason. Or maybe you need to specify the article, not the rendition ID? But Manaus looks like he’s implementing it correctly, so I guess the tag’s broken.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#2340 2016-03-02 16:48:40

giampablo
Member
From: Italy
Registered: 2008-07-17
Posts: 86
Website

Re: MLP - The Multi-Lingual Publishing Pack

Beg to disagree, Stef.
the l10n_permlink tag is not broken. It outputs, as per the documentation, the permalink to the rendition, not the ID (that is what I need). I tested in every reasonable way:
the tag renders this http://mysite.com/section/mio_articolo while I browse in italian
and http://mysite.com/section/my_article if in english.
So, it seems to me the intended behavior, it links to the rendition, as the tag name explicitly says, even if I do not know what use I can make of it.

This <txp:article id='<txp:l10n_get_rendition_id articleid="16" />' /> does not output anything (not even a tag error). Same if change articleid (article ID or rendition ID). Take note that I am on a page, not in an article-list contest.

Just fwiw.
Regards

Offline

Board footer

Powered by FluxBB