Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#397 2007-09-29 19:44:21
Re: MLP - The Multi-Lingual Publishing Pack
Hi
I using the MLP from some months now. I have fixed most of the problems thanks to this posts.
My site is http://www.valugi.ro
One of the last things I want to fix is this error:
When I have a category selected like this:
http://valugi.ro/en/category/Society
and I try to change the language by passing from english to romanian it goes here:
http://valugi.ro/ro/category/Society and I get a 404
when it should go here:
http://valugi.ro/ro/categorie/Society
I think this happens because of the translation of “category” to “categorie”
and the real path that I should see should be:
http://valugi.ro/ro/categorie/Societate
because I also have a translation for the category name.
Anybody had this problem so far and how did you solve it?
thanks
= truth is a chameleon =
Offline
#398 2007-09-29 20:53:15
- marios
- Archived Plugin Author
- Registered: 2005-03-12
- Posts: 1,253
Re: MLP - The Multi-Lingual Publishing Pack
valugi wrote:
Hi
I using the MLP from some months now. I have fixed most of the problems thanks to this posts.
My site is http://www.valugi.ro
One of the last things I want to fix is this error:
May be, there is no specific content localized in order to be displayed for that category. I’ve had a short look, but am too busy at the moment to go through all the categories.
In my consideration, you should watch out, how your category links are beeing built.
For localized category title display, I use the title=1 attribute setting, for url constructs I use title=0.
The Title Value should basically not be used in URL constructs, due to possible accents and other non ASCII characters, and such.
So if I have a localized content under the category society which does exist in ro and en, then I get a page:
http://example.com/en/category/society/
http://example.com/ro/category/society/
at both above urls in the localized version.
Otherwise, if there is no localized content under ro available, I get a 404.
regards, marios
⌃ ⇧ < ⎋ ⌃ ⇧ >
Offline
#399 2007-09-29 21:15:53
Re: MLP - The Multi-Lingual Publishing Pack
ok
Actually this is preferences option “Permanent link mode” which in my case is set as /section/title.
I’ll change this for a quick fix.
Thanks
= truth is a chameleon =
Offline
#400 2007-10-01 10:26:57
- Sandy
- New Member
- Registered: 2007-05-10
- Posts: 5
Re: MLP - The Multi-Lingual Publishing Pack
Hi everybody,
So far I did not have any problems with MLP Pack on my local host, till I moved site to the real host. I try to clone file description (Content-Files). After saving changes or cloning file description I return to Edit page (Content-Files) and see nothing except the first file description, but checking database I fount those invisible descriptions inside database. Beside that I cannot change existing file descriptions. Any idea?
With best regards
Offline
#401 2007-10-13 12:24:49
- marios
- Archived 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
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
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
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. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#405 2007-10-18 04:13:26
- marios
- Archived 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
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
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. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#408 2007-10-19 17:58:26
- marios
- Archived 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