Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1096 2008-12-14 17:54:20
Re: MLP - The Multi-Lingual Publishing Pack
fantastic.
thanks els.
its a bad hen that wont scratch itself.
photogallery
Offline
#1097 2008-12-16 02:58:05
Re: MLP - The Multi-Lingual Publishing Pack
@net-carver
another feature request: what do you think about integrating (as an optional plug-in) this i18n_IP2Country project?
This could add an option to override browser language and use the visitor’ss IP to tell TXP/MLP which language to serve.
If possible, there should be some kind of interface that lets you associate a country to a language.
So, you can set something like: “Argentina, Spain -> es”, “USA, UK -> en”, “France -> fr”, “Others -> en”.
Once the above associations are made, then, in pseudo-algorithm:
1) check the visitor’s IP address
2) define which country is the visitor coming from
3) look which language is associated for that country. If not defined, serve some default language.
Ideally, there should be another option that let you define which data (browser language or IP2country) should be honored.
I see also some possibilities for a txp:i10n_if_country name="..." tag/plugin… :D
Offline
#1098 2008-12-16 08:51:07
Re: MLP - The Multi-Lingual Publishing Pack
maniqui wrote:
what do you think about integrating (as an optional plug-in) this i18n_IP2Country project?
Hmm, not wishing to put words in Steve’s mouth but from my own experiments with it before (spookily as an integration with an MLP site) I found:
- it’s actually not that reliable — I got false negatives in France, for example
- iirc it only supports IPv4
- if it ever supports IPv6 it’ll probably need updating frequently as new tranches of IP are released to countries (I’m not sure how IPv6 are allocated so this might not be an issue)
- the list itself is currently over 700kB as a file, which bloats the MLP download
- the list has to be stored in the DB (a big table), since finding an entry from a file with over 87000 entries every time you view a page is impractical. That adds a good few Mb to your DB (longer backups/downloads/restores) for very little gain. From memory my 400kB TXP install went up to approx 7Mb with this installed; and that’s without any logs
Like I say, just personal experience with it. Others’ mileage may vary.
Last edited by Bloke (2008-12-16 08:57:10)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#1099 2008-12-16 22:09:13
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: MLP - The Multi-Lingual Publishing Pack
All
just to say, I’ve made the MLP Pack repo on GitHub public read-only so anyone with great ideas and some PHP knowledge can now fork the project for themselves.
There are two branches — you can check either but watch the development branch commits if you want to keep up with the latest changes.
— Steve
Offline
#1100 2008-12-16 23:34:05
Re: MLP - The Multi-Lingual Publishing Pack
Steve, thanks for your replay!
1. Another feature i think would be intersing for others:
Imaging we have article named ArticleCommon. It has two (or more) renditions, each name is ArticleRussian and ArticleEnglish. Imaging, we’re viewing ArticleRussian at site. How do i get the id of ArticleEnglish? I think new tag can be used, like
<txp:l10n_custom_rendition_id lang="en" /> – the idea is to output id of another rendition of required article.
This new (if you like the idea) tag can support such attributes:
- id = if ommited must be used current articleid (<txp:article_id />)
- lang = which rendition’s id to output. In my example it was set to
enbecause i was viewing russian rendition. And for some safe parsing, if it is possible, this tag should use language another than viewing currently AND if there are only two languages at site. I hope i described it undestandably :)
This tag, i think, would be popular in developing, because currently i don’t now how to get id of english rendition while viewing russian rendition… Or may be new behaviour could be assigned to l10n_get_rendition_id, if developers aren’using this tag now?
2. Not sure that it’s bug, i think it is future improvement – it’s about View link which is next to the Title field in article write tab

The link is building wring url – when i open it within messy mode i get bad page with errors. I see two ways:
- Improve redirection (which redirect me form
site.rutosite.ru/ru) - Edit this link in backside, the language to be injected to it could the same as adin side language
Thanks for you plugin! It really rock’s! :)
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
#1101 2008-12-17 00:00:14
Re: MLP - The Multi-Lingual Publishing Pack
@Victor
Now we are two requiring this ;)
Take a look at my post here.
My proposal: “What if a rendition for an article could access fields (custom fields, article_image, etc) from another rendition of the same article?”
BTW, Victor, why are you asking this feature?. I mean, what would you like to achieve by having the article ID of another rendition for the same article?
In my case, one of the ideas I’ve for this, it’s to pass it (the id) as the value for article_custom, so then, I could fetch some data from that rendition.
For example, to “share” custom field values across renditions.
Let’s wait for net-carver to see what he has under his sleeves…
@Bloke,
All valid points to reject this IP2Country addition. Thanks for clarifying.
Last edited by maniqui (2008-12-29 20:19:59)
Offline
#1102 2008-12-17 00:06:51
Re: MLP - The Multi-Lingual Publishing Pack
Julián wrote
BTW, Victor, why are asking this feature?. I mean, what would you like to achieve by having the article ID of another rendition for the same article? In my case, one of the ideas I’ve for this, it’s to pass it (the id) as the value for article_custom, so then, I could fetch some data from that rendition.
My aim seems to be the same – access to custom_fields of another renditions. What for do I need ‘em? :) I have build complicated site tree where elements of tree are only articles. So, articles can have sublelevels, which are articles. I sounds not clearly, but after site would be finished i’m going to publicate my idea :)
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
#1103 2008-12-17 20:58:27
Re: MLP - The Multi-Lingual Publishing Pack
Hello All,
I upgraded to 4.0.7 and also downloaded the MLP version 0.9.11. When i run my site i get the following errors:
tag_error <txp:article form="static_text" /> -> Textpattern Warning: Unknown column 'Expires' in 'where clause'
select count(*) from l10n_txp_nl_nl where 1=1 and Status = 4 and Posted <= now() and (now() <= Expires or Expires = 0) and Section != 'cursus' and Section != 'artikelen' and Section != 'boek' and Section != 'praktijk' and Section != 'contact' on line 110
tag_error <txp:article form="static_text" /> -> Textpattern Warning: Unknown column 'Expires' in 'field list'
select *, unix_timestamp(Posted) as uPosted, unix_timestamp(Expires) as uExpires, unix_timestamp(LastMod) as uLastMod from l10n_txp_nl_nl where 1=1 and Status = 4 and Posted <= now() and (now() <= Expires or Expires = 0) and Section != 'cursus' and Section != 'artikelen' and Section != 'boek' and Section != 'praktijk' and Section != 'contact' order by Posted desc limit 0, 10 on line 110
tag_error <txp:article_custom form="sidebar_praktijk" sort="posted asc" time="any" section="praktijk" limit="1" /> -> Textpattern Warning: Unknown column 'Expires' in 'field list'
select *, unix_timestamp(Posted) as uPosted, unix_timestamp(Expires) as uExpires, unix_timestamp(LastMod) as uLastMod from l10n_txp_nl_nl where 1=1 and Status = 4 and (now() <= Expires or Expires = 0) and Section IN ('praktijk') order by posted asc limit 0, 1 on line 110
tag_error <txp:article_custom form="sidebar_cursus" time="any" section="cursus" /> -> Textpattern Warning: Unknown column 'Expires' in 'field list'
select *, unix_timestamp(Posted) as uPosted, unix_timestamp(Expires) as uExpires, unix_timestamp(LastMod) as uLastMod from l10n_txp_nl_nl where 1=1 and Status = 4 and (now() <= Expires or Expires = 0) and Section IN ('cursus') order by Posted desc limit 0, 10 on line 110
I don’t know this has someting to do with the MLP plugin. The problem is that i don’t see any article on my site.
Hope somebody can help me.
Kind regards
Maarten
Kind regards,
Maarten
Offline
#1104 2008-12-17 21:59:04
Re: MLP - The Multi-Lingual Publishing Pack
The Expires column is missing in your l10n_txp_nl_nl table. It should be similar to the textpattern table.
Last edited by ruud (2008-12-17 22:03:13)
Offline
#1105 2008-12-17 22:13:00
Re: MLP - The Multi-Lingual Publishing Pack
Hello Ruud,
Any idea how i can get the table correct? Should i do this manualy?
Thx in advance.
Kind regards,
Maarten
Kind regards,
Maarten
Offline
#1106 2008-12-17 22:32:40
Re: MLP - The Multi-Lingual Publishing Pack
In PHPmyadmin, try executing this SQL query:
ALTER TABLE l10n_txp_nl_nl add Expires datetime NOT NULL default '0000-00-00 00:00:00' after Posted;
Last edited by ruud (2008-12-17 22:33:11)
Offline
#1107 2008-12-17 22:33:19
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: MLP - The Multi-Lingual Publishing Pack
Maarten, probably running the uninstall wizard, and then the install wizard again, will solve the problem.
Edit: I think the cause is your order of events, I first upgraded MLP, and then Txp, and had no problems.
Last edited by els (2008-12-17 22:35:30)
Offline
#1108 2008-12-18 02:46:31
Re: MLP - The Multi-Lingual Publishing Pack
I’ve jmd_sitemap installed, and I’ve that strings for this plug-in can be translated on “MLP -> Plugins”.
The weird thing is that there is a box on the right, under the “Notice…” heading that says:
“This plugin is no longer installed or may be running from the cache directory.”
But the plugin is installed and it’s not running from the cache directory (afaik).
Also… what’s that 0.9.11 version on your site, Steve? I will update later, but I’m curious about it.
Thanks.
Offline
#1109 2008-12-18 19:44:29
Re: MLP - The Multi-Lingual Publishing Pack
ruud and els,
Both thanks for your help!! To solve my problem i followed uninstalled and installed MLP again. After that everything works fine again.
Kind regards,
Maarten.
Kind regards,
Maarten
Offline
#1110 2008-12-19 05:40:15
Re: MLP - The Multi-Lingual Publishing Pack
Hello,
this doesn’t seem to be working on a MLP 0.9.11 + Txp 4.0.7 install.
<txp:l10n_permlink articleid="23" debug="1">##terms_conditions##</txp:l10n_permlink></p>
array (
'debug' => '1',
'articleid' => '23',
'class' => '',
'style' => '',
'title' => '',
'titlegtxt' => '',
)
select ID from textpattern where `l10n_group`='23' and `Status`>=4 and `l10n_lang`='es-es'
Rendition ID []
BTW, it works fine on another (0.8.7 + 4.0.6) installation, which I cannot upgrade because it’s running on a MySQL < 4.11.
Edit: it works. Remember that articleid is the id of the row of renditions, which you can find out on “MLP -> Articles” tab.
1 Yeah, I installed it long time ago and now I tried an updated to 0.9.11 + 4.0.7 but had to revert back because on the Wizard tab, there was a message telling me that “It requires MySQL 4.1 or above, current install is 4.0.18-standard-log.”. In fact, the message was always there on 0.8.7 + 4.0.6, but I never have had to run the wizard.
In other words, it works flawlessly, but I can’t upgrade.
Last edited by maniqui (2008-12-29 21:07:43)
Offline