Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1651 2010-12-23 18:24:03

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

Re: MLP - The Multi-Lingual Publishing Pack

paxrex33 wrote:

I need a way to detect the current language and to redirect user to the rendition in other language.
The client wants only the first page to be translated and all others to be shown in default language.

By ‘other language’ do you mean the default language? I don’t quite understand why you’d need to redirect visitors if all other pages are in one language only…

Offline

#1652 2010-12-23 19:50:44

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

Re: MLP - The Multi-Lingual Publishing Pack

If anyone wants to test out the recent fixes against 4.3, just install Txp 4.3, download and install mlp-0.9.13-gp then update the following files using the content of the links in the table…

l10n.css Replacement…
lib\l10n_admin.php Replacement…
lib\l10n_base.php Replacement…

I hope this should give you a fairly functional MLP on TXP 4.3 installation.


Steve

Offline

#1653 2010-12-23 22:11:19

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

Re: MLP - The Multi-Lingual Publishing Pack

Thank you Steve!!! Just updated six MLP sites (4 production sites – one even from 4.0.7 -, 2 test sites in subdomains), and everything seems to work as it should.

For everyone who is just as happy with this as I am, Steve has a Paypal button on his site :)

Offline

#1654 2010-12-23 22:19:41

imd
Member
From: Finland
Registered: 2010-12-13
Posts: 15
Website

Re: MLP - The Multi-Lingual Publishing Pack

Is there a list of MLP tags with the options description? I can’t find such.

Offline

#1655 2010-12-23 22:22:29

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

Re: MLP - The Multi-Lingual Publishing Pack

It’s in the plugin help. See under ‘Manage’ in Admin > Plugins. I think there is one tag missing there, I’m planning to copy the help to txpforge.org soon and add it there.

Offline

#1656 2010-12-23 22:26:46

imd
Member
From: Finland
Registered: 2010-12-13
Posts: 15
Website

Re: MLP - The Multi-Lingual Publishing Pack

Els wrote:

It’s in the plugin help. See under ‘Manage’ in Admin > Plugins. I think there is one tag missing there, I’m planning to copy the help to txpforge.org soon and add it there.

Right. The help link. Thanks.

Offline

#1657 2010-12-23 22:36:38

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

Re: MLP - The Multi-Lingual Publishing Pack

I hope Graeme and I can get a new 4.3 compatible version up on txpforge as a complete build (zip file) fairly soon.

We plan to synchronize the version numbers of the MLP pack with the version of Textpattern it is compatible with. So the MLP Pack will be jumping to MLPv4.3 with the next full build.


Steve

Offline

#1658 2010-12-24 10:49:47

paxrex33
Member
Registered: 2007-10-25
Posts: 15

Re: MLP - The Multi-Lingual Publishing Pack

Els wrote:
I don’t quite understand why you’d need to redirect visitors if all other pages are in one language only…

Well, it’s not that simple.
I have 5 languages in total.
Every page and every article will be translated in default language and english.
Only the front page will be translated to all 5 languages.

User can choose the language.
I want to redirect the user to english translation if he chosed language different than default language.

Is that possible?

Offline

#1659 2010-12-24 14:08:17

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

Re: MLP - The Multi-Lingual Publishing Pack

net-carver wrote:

I hope Graeme and I can get a new 4.3 compatible version up on txpforge as a complete build (zip file) fairly soon.
We plan to synchronize the version numbers of the MLP pack with the version of Textpattern it is compatible with. So the MLP Pack will be jumping to MLPv4.3 with the next full build.

Thank you both so much for this, I really appreciate it!
I haven’t still upgraded some old txp 4.08 sites fearing possible issues. Now I hope I’ll have the opportunity to try it soon, thanks again

Offline

#1660 2010-12-25 00:47:04

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

Re: MLP - The Multi-Lingual Publishing Pack

paxrex33 wrote:

User can choose the language.
I want to redirect the user to english translation if he chosed language different than default language.

Is that possible?

Yes, I think so. But do you really mean to redirect the visitor or to show link(s) to the English page(s)?

Anyway, if I understand you correctly, something like this:

<txp:l10n_if_lang lang="xx"><!-- "xx" is default language -->
<txp:else />
   // send to english translation
</txp:l10n_if_lang>

Offline

#1661 2010-12-26 23:56:09

imd
Member
From: Finland
Registered: 2010-12-13
Posts: 15
Website

Re: MLP - The Multi-Lingual Publishing Pack

Anyone has seen it with 4.2.0 and 0.9.13-gp? Or did I configure something wrong with MLP?

When I first time on the site landing page the l10n_lang_list outputs incorrect links, like for instance: site_url/section/images/7.gif, instead of site_url/section/en/. When I get in by clicking one of the menu section links the language bar links are perfectly correct, as they should be.

I have also noticed same kind of behavior with zem_contact_reborn 4.0.3.20. When I try to submit form for the first time, it is fully fine, but if there are errors about input, the newly generated form has fake address in <form … action=”
site_url/section/images/7.gif#zcre4a7598bd49011c12cc7b8c953a4c30a”>.

Anyone met the problem before? Thanks in advance for your fast reply!
If the first one I can work around by checking the section name, then the second is somewhat

Offline

#1662 2010-12-27 00:01:37

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

Re: MLP - The Multi-Lingual Publishing Pack

What is that image 7.gif? Are you using some plugin or other method to display country flags instead of language names?

Offline

#1663 2010-12-27 00:29:36

imd
Member
From: Finland
Registered: 2010-12-13
Posts: 15
Website

Re: MLP - The Multi-Lingual Publishing Pack

Els wrote:

What is that image 7.gif? Are you using some plugin or other method to display country flags instead of language names?

No flags. Just output the text link with
<txp:l10n_lang_list wraptag=“span” list_class=“lang_bar” break=“span” current_class=“active” language_class=“short” link_current=“1” />

image can be any, though the fake address is always a link to image/something. Like:

<span class=“lang_bar”><span class=“ru”><a href=“http://127.0.0.1/urartu/ru/images/images/7.gif”><span dir=“ltr”>Русский</span></a></span> <span class=“en active”><a href=“http://127.0.0.1/urartu/en/images/images/7.gif”><span dir=“ltr”>English</span></a></span></span>

Offline

#1664 2010-12-27 01:43:07

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

Re: MLP - The Multi-Lingual Publishing Pack

I’ve never seen this before. Did you check the tag trace if it gives you any clues? You can post it here if you want.

Offline

#1665 2010-12-27 02:01:11

imd
Member
From: Finland
Registered: 2010-12-13
Posts: 15
Website

Re: MLP - The Multi-Lingual Publishing Pack

Els wrote:

I’ve never seen this before. Did you check the tag trace if it gives you any clues? You can post it here if you want.

A bit of mystery. I found that the cause of the problem was/is the search form in the header right after the language bar:

<txp:l10n_lang_list wraptag="span" list_class="lang_bar" break="span" current_class="active" language_class="short" link_current="1" />
<form class="siteSearch" method="get" action="http://www.google.fi/search">
  <input type="hidden" name="q" value="site:urartu.fi" />
  <input type="text" class="siteSearchText" name="q" value="##search##" onblur="if (this.value == '') {this.value = '##search##';}"  onfocus="if (this.value == '##search##') {this.value = '';}" />
  <input type="image" class="siteSearchSubmit" src="images/7.gif" value="" size="9,10" />
</form>

I have it commented now and everything looks ok, both l10n_lang_list and zem contact form work as they should. It is strange, I will have a fresh look tomorrow. The search form looks fully ok. I was about to replace it with the txp search any way.

Offline

Board footer

Powered by FluxBB