Textpattern Forum

You are not logged in. Register | Login | Help

#401 2007-10-13 12:24:49

marios
Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: MLP - The Multi-Lingual Publishing Pack

For completeness:

  • A bug that didn’t make it possible for the feeds to validate on specific URL’s

To fix this I just removed the Atom Member from the feeds_array function in the l10n plugin, that is an easy hack, since I don’t need the Atom Feeds anyway.

So lline 428 should read now: $feeds = array( 'atom' );

And voila, RSS feeds are now working and validating again.

This Bug, I believe is directly related with the one that has been found by Els here, and diagnozed by Ruud.
Possibly, it could also be the reason for this Issue reported here

BOM’s are small evil devils coming from Redmond, and they should NOT been used at all in UTF-8-encoded files, especially when dealing with PHP, no matter what has been suggested otherwise.
See also related article here
( On MAC OS, opening a file with a BOM at the beginning with Textedit, and then resaving it, will strip it off as well.)

  • Some Files, when inspecting them with SCUnipad on Windows where encoded in ASCII (ext + xml), instead of UTF-8,
    I don’t know, if that could cause trouble on some Servers, however for consistency, I just converted all the Files of the Pack to UTF-8.
  • Unescaped curly quotes, in the zem_contact_lang-mlp plugin ( Inside the zem_crl_strings array )

These need to be converted to their numeric XHTML entities:

Besides that, I think I haven’t found anything serious yet.

regards, marios

Last edited by marios (2007-10-14 22:18:56)


⌃ ⇧ < ⌃ ⇧ >

Offline

#402 2007-10-14 14:25:05

LeonNet
Plugin Author
From: Deutschland
Registered: 2007-07-12
Posts: 17
Website

Re: MLP - The Multi-Lingual Publishing Pack

Hello Forum,

i have installed the MLP PlugIn on txp4.0.5 it works partial.
I make the workaround with

$reassigning_permitted = true; $has_reassign_privs = true;

to see not the white page.

Some Articles works fine, some article in frontend are not shown.

Furthermore in the section are only one language field are displayed.

Please help.

Offline

#403 2007-10-16 06:05:14

Exiladler
Member
From: somewhere in Europe
Registered: 2006-08-20
Posts: 56
Website

Re: MLP - The Multi-Lingual Publishing Pack

First of all, thanks for this phantastic plug-in, just what I was looking for. Took me 3 attempts to get it working. Best piece of advice if you are thinking of using it, fresh install of txp with no other plug-ins installed, then work your way up, was the way it worked for me in the end.

Now for a very small thing. I would love to replace the language text displayed at the top of my pages from text to images. Simply would love to replace english with a UK flag and likewise for the rest of the languagesI have translated, therefore I guess I would need some kind of solution involving the l10n_lang_list tag to allow images, or a possibility to have an individual css class assigned to each of the languages and then just use the background in css to manage that.

Anyone got any advice or work around how to manage this simple sounding task?

Regards
Peter

Offline

#404 2007-10-16 09:24:03

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,804
Website

Re: MLP - The Multi-Lingual Publishing Pack

Exiladler wrote:

I would love to replace the language text displayed at the top of my pages from text to images.

Hi, in theory yes it’s simple but the l10n_lang_list currently doesn’t support anything other than an unordered list. I hacked mine to add wraptag and break options so I could offer an HTML SELECT drop down but the whole function could do with rewriting properly to accomodate the many different uses. One day…

For now, if you don’t mind getting your hands dirty with PHP you could try something like this in a form:

<txp:php>
  global $pretext;
  $lngs = MLPLanguageHandler::get_site_langs();

  foreach ($lngs as $lng) {
    $uri = rtrim( serverSet('REQUEST_URI') , '/' );
    $codes = MLPLanguageHandler::compact_code($lng);
    echo '<a href="'. hu . $codes['short']. $uri.'"><txp:image name="flag_'.$codes['short'].'.jpg" /></a>';
  }
</txp:php>

The idea is you upload images to your TXP image tab with names like flag_en, flag_fr, flag_de etc and it’ll pick them, adding a link round the outside to the current page.

It’s not thoroughly tested and not pretty and assumes you’re using /section/title/ style links and ‘short’ language codes but it should get you going or at least maybe give you (or someone else reading who can improve it) ideas on how to approach it.

You could try replacing the <txp:image... /> bit with a conventional <img src=...> tag if you didn’t want to upload the files via the TXP interface, or even use some CSS with a background image like you suggested.

The other thing you might be able to use are Snippets (though I haven’t thought this through yet). Maybe you could set up a snippet called ##country_flags## in a form and then use that to assign an image tag to each different country. Substitute the <txp:image...> part of the code for your snippet name and see where it takes you.

Hope that helps.

Last edited by Bloke (2007-11-20 16:20:19)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern.

Txp Builders – finely-crafted code, design and Txp

Offline

#405 2007-10-18 04:13:26

marios
Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: MLP - The Multi-Lingual Publishing Pack

Exiladler wrote:

Now for a very small thing. I would love to replace the language text displayed at the top of my pages from text to images.

If you are interested to know, the I10lang tag applies a lang specific class, to your lang li elements, and the lang codes are used as class names.

So for a more accessiblity and SEO friendly solution, the only thing needed, is to apply an extra rule to the ul li elements.

e.g.:

#lang_nav li {

text-indent: – 15000px;
width: xpx;
height: ypx;
}

Now you can target each li member one by one, like that:

li.en-gb {

background: #fff url(/images/en-gb.png) top left no-repeat;

}

etc.

( Like in the exapmle mentioned above, and for consistency, it makes sense to name each flag, according to the lang-code )

regards, marios

Last edited by marios (2007-10-18 04:17:08)


⌃ ⇧ < ⌃ ⇧ >

Offline

#406 2007-10-18 09:36:01

Exiladler
Member
From: somewhere in Europe
Registered: 2006-08-20
Posts: 56
Website

Re: MLP - The Multi-Lingual Publishing Pack

Marios

Many thanks, what a neat solution, already implementing it

Offline

#407 2007-10-19 11:16:56

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,804
Website

Re: MLP - The Multi-Lingual Publishing Pack

Yeah, nice solution Marios. Excellent stuff. I always over-complicate things. That’s why you’re sigma and I’m mere eta :-)

I’ll get my coat…


The smd plugin menagerie — for when you need one more gribble of power from Textpattern.

Txp Builders – finely-crafted code, design and Txp

Offline

#408 2007-10-19 17:58:26

marios
Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: MLP - The Multi-Lingual Publishing Pack

Bloke wrote:

Yeah, nice solution Marios. Excellent stuff. I always over-complicate things. That’s why you’re sigma and I’m mere eta :-)

I’ll get my coat…

I already ate my hat. So please put coat back into wardrobe. Roger

(Bloke is president on Planet Code. period )

regards, marios


⌃ ⇧ < ⌃ ⇧ >

Offline

#409 2007-10-25 14:16:04

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

Re: MLP - The Multi-Lingual Publishing Pack

I really like textpattern and I wanted to use it for my site but…
My site should be bilingual so I wanted to install MLP and use it with Textpattern.
I had few problems during the install.

I’m using WAMP5 1.7.2 (Apache/2.2.4; MySQL 5.0.41; PHP 5.2.3) and Textpattern 4.0.5 on WinXP SP2.

First problem:
During the install process of MLP, tables l10n_txp_en_gb and l10n_txp_hr_hr were not created so I had to create them myself.
I found setup_7() function in l10n_admin_classes.php and echoed the query. I ran the query in PHP My Admin and it failed also.

Second problem:
This admin language thing is very annoying. Whatever language I choose in admin/preferences tab it uses English. I tried all the tricks I found on this forum (Firefox languages) and nothing happened.

Third problem:
Section title can only be entered in English. I updated the database myself but nothing happens. Still only english titles are displayed. How can this be fixed? I’m willing to help but my knowledge of PHP is rather poor. I found on this forum that it wasn’t the case with Textpattern 4.0.4. But I can’t download 4.0.4 version.
Can somebody send the link to previous version? I can’t find it.

Offline

#410 2007-10-25 14:42:10

Gocom
Developer
Registered: 2006-07-14
Posts: 4,471
Website

Re: MLP - The Multi-Lingual Publishing Pack

You should not downgrade Textpattern to 4.0.4. – never. It’s for your own safety, and for security of your website.

But if you wan’t to see earlier versions, see releases browser

And for the full 4.0.4. zip, click & download here

Cheers!


Rah-plugins | What? I’m a little confused… again :-) <txp:is_god />

Offline

Board footer

Powered by FluxBB