Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#949 2008-09-29 03:35:13

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

Re: MLP - The Multi-Lingual Publishing Pack

kvnmcwebn wrote:

hi, i have installed the pack but cant get it working. Im having problems getting my head around it.
Are there any more documentation/tuts for dummies other than the ones included with the install?
thanks

Have you tried the video (link in the head post) ? If there’s something specific you’re struggling with, you can ask here or hang out on #textpattern/#xpat on IRC and contact me there if you want to ask anything more specifically. Although this is a long thread, asking here will get more eyes looking at your issues.


Steve

Offline

#950 2008-09-29 05:10:48

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

Re: MLP - The Multi-Lingual Publishing Pack

patchwork wrote:

There is no “active_class” attribute/behaviour in this tag, yet, so that didn’t work. But it did build an anchor element that included the “Title”, “Class” and “Style” attributes.

The Title attribute didn’t work like in the txp:section tag where it returns the human readable title of the section beeing called, it worked like a anchor attribute.

Hello patchwork. This tag is a pretty simple wrapper around txp’s own permlink tag. Interested to hear where you might want this to go though. BTW, how would an article know it was active?


Steve

Offline

#951 2008-09-29 13:47:17

goncalo.dumas
Member
From: Lisbon
Registered: 2005-12-14
Posts: 97
Website

Re: MLP - The Multi-Lingual Publishing Pack

net-carver wrote:
p. Hello patchwork. This tag is a pretty simple wrapper around txp’s own permlink tag. Interested to hear where you might want this to go though. BTW, how would an article know it was active?

Hello Steve. I am using it inside a simple <a> element that would link to a static txp page available in two languages. The “current” funcionality would allow me to mimic a menu-like behaviour. Maybe I’m getting it all wrong, but, how would you create a link to an article with two renditions? This is how I done:

<a href="<txp:l10n_permlink articleid="2" />"<txp:if_article_id id="3,4"> class="active"</txp:if_article_id>>##go-to-article##</a>

Is there any other way? Thanks

Offline

#952 2008-09-29 16:06:33

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

Re: MLP - The Multi-Lingual Publishing Pack

net-carver wrote:

If you are so inclined, please could you submit your upcoming translations to the String Exchange when ready — thank you!

Yes of course!

BTW, there is a little technique you can use to help you track down where the strings are used.

Oh thank you! I’ve seen that one before, but completely forgot about it :)

Offline

#953 2008-09-29 16:47:36

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

Re: MLP - The Multi-Lingual Publishing Pack

kvnmcwebn

This thread might turn up some useful information for you as it develops.

Els

You’re welcome.

patchwork

Is there any other way? Thanks

Hmm. You want to do it like a menu. You get that kind of functionality for free with sections so you could create a section just for this one article and then use txp’s if_section tag to take care of displaying either the content of a snippet or a sticky article itself.

Summary…

  1. Create new section
  2. Make section appear in the menu structure like any other
  3. Modify page template to just do an article_custom to your static article —or— just output the content of a snippet

On a recent site I did this using a page template called static to which I assigned any section with static pages. I then used if_section conditionals in the static section’s page to control how it behaved for each section. Sometimes an article was a good choice (low-priv users can edit them), at other times, a simple snippet would do the job. If the text needs to be fixed from low-priv user tampering then you could even put the text into a form and wrap language section in an l10n_if_lang conditional.

Hope that gives you some ideas.


Steve

Offline

#954 2008-09-29 16:54:47

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: MLP - The Multi-Lingual Publishing Pack

Steve, all
I beg your pardon for being so pedantic but I’ll ask another time (the last one I promise).
To simplify I’ll quote my previous post

…the problem is whatever rendition I click on “articles” sub-tab the language popup in the “write” tab defaults to the last selected languange.
In other worlds it doesn’t seem to change accordingly to the rendition I’m editing

Steve said “That shouldn’t be happening” and kindly offered to have a look to my installation but unfortunately it’s still not online.
So, can you please confirm this actually works in the last development version? I’ve tried removing temporarily all my hacks but still no luck :(
Thank you in advance and sorry to pollute the forum with my personal mess.

Offline

#955 2008-09-29 17:19:58

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

Re: MLP - The Multi-Lingual Publishing Pack

redbot

Hi. No problem. I’d be interested to know if anyone else can reproduce this problem as I don’t see that on my test site. In fact, I don’t see any language popup on the cloned pages at all unless you mean the admin language picker at the top right corner. What is the value of your MLP preference called “Power users can change a rendition’s language or article?”


Steve

Offline

#956 2008-09-29 18:45:48

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: MLP - The Multi-Lingual Publishing Pack

Steve,
thank you for your promp help. Here is a picture of the “write” tab after I click on any cloned rendition in the “articles” sub-tab.

and “Power users can change a rendition’s language or article?” is set to “yes”
Thank you

Offline

#957 2008-09-29 19:39:56

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

Re: MLP - The Multi-Lingual Publishing Pack

net-carver wrote (about 0.8.7dev):

Upgrading to this version.

  1. Backup!
  2. Overwrite all the files in your /textpattern/lib directory with those from the zip
  3. Add the zip’s txp_img images to your /txp_img directory
  4. Install the new plugins (with the exception of zem_contact_reborn_lang-mlp if you don’t use zem_contact reborn) and activate them
  5. Delete the existing /textpattern/lib/l10n.css file and install the one from the zip to /textpattern (not in the /lib subdirectory)

Yesterday I upgraded from 0.7.636 to 0.8.7dev following these instructions. After that I experienced behaviour that I never noticed before, so to check if it really didn’t happen in the older version I want to go back temporarily. What I did was

  1. Backup
  2. Overwrite the files in /textpattern/lib/ with the ones from the 0.7.636 zip
  3. Delete l10n.css from /textpattern/
  4. Here it goes wrong: when I want to access the back-end to install the ‘old’ plugin I get this error:

Fatal error: Call to undefined function _l10n_load_localised_pref() in /home/els/sites/skippyworks/textpattern/lib/txplib_misc.php(574) : eval()’d code on line 352

I probably did something wrong, or maybe it’s not possible (or wise) at all to downgrade?

Last edited by els (2008-09-29 19:41:03)

Offline

#958 2008-09-29 23:03:16

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: MLP - The Multi-Lingual Publishing Pack

Thank you Steve!
Your last post opened my eyes and I have no more doubts now: I’m thick.
I simply had to set “Power users can change a rendition’s language or article?” to “no” and all my problems are gone.
To give further proof of my thickness I must admit the option description is really clear; I’ve set it to “yes” at the beginning and never thought about changing it though I toggled on and off all other options approximately a million times.
So, again, thank you, your help was really appreciated.

Els
I can’t be of great help here but I upgraded to 0.8.7dev and I had no problems (apart for those hand-crafted by myself).
Which odd behaviour are you experiencing?

Offline

#959 2008-09-30 10:57:08

Si
Member
From: Kiev
Registered: 2008-08-31
Posts: 45
Website

Re: MLP - The Multi-Lingual Publishing Pack

net-carver wrote:

sorry but the MLP Pack doesn’t support localising the fields of arbitrary non-native Txp tables if that’s what you’re referring to. However, I know that at least one person has had some success at using that plugin with the MLP pack.

Yes, that’s what I meant. Thanks anyway, I hope there will be a solution in the future to combine these two great plugins

Offline

#960 2008-09-30 15:56:36

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

Re: MLP - The Multi-Lingual Publishing Pack

[Edit: (partially) as good as solved, see post #962 and onward.]

Which odd behaviour are you experiencing?

A couple of things, which I assume must be related. The site has two languages, English and Dutch.

  • First odd behaviour is that when a form is submitted through zem_contact_reborn, the language marker in the URL (/en or /nl) disappears. So the URL looks like site.com/about/#zcretcetera instead of site.com/en/about/#zcretcetera. This in itself is not a very big problem, because the right language is still displayed, though I don’t know if it is supposed to happen.
  • When the form is not submitted because one or more fields are not filled correctly and one or more errors are shown, the same thing happens. When, after filling all fields correctly, I submit the form once again, things are getting more than odd… On the Dutch page, the form is submitted. On the English page, I get a 405 Method Not Allowed. The URL of that page is site.com/favicon.ico#zcretcetera??? Search me… (This only happens when the form is re-submitted after the errors are displayed.)
  • Also, when I’m on a page with a URL like site.com/about/#zcretcetera, the link to the Dutch page in the language list (created with <txp:l10n_lang_list />) links to site.com/nl/favicon.ico instead of site.com/nl/about/… (This does not happen with the link to English on the Dutch page!)
  • In the <head> section of my page I have these two lines of code using <txp:site_url />, it gives a different output in each case:
    • @<script type=“text/javascript” src=”<txp:site_url />textpattern/jquery.js”></script>@ output is correct: src="http://site.com/textpattern/jquery.js"
    • @<link rel=“shortcut icon” href=”<txp:site_url />favicon.ico” />@ output: href="http://site.com/en/favicon.ico" /> (or /nl, depending on the page’s language). Even if I replace <txp:site_url /> with the hardcoded full url, the language marker is still inserted.

I’m pretty sure all this did not happen in the previous version of MLP, but I intended to make sure before I posted this. Unfortunately I haven’t managed yet to revert to the older version (see my previous post).
It’s quite possible I’m overlooking something obvious, but I don’t see it :( so any pointers are appreciated! …and that was indeed the case…

Last edited by els (2008-09-30 17:01:34)

Offline

Board footer

Powered by FluxBB