Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1369 2009-09-07 07:45:46
- ferenczi
- Member
- Registered: 2005-01-31
- Posts: 67
Re: MLP - The Multi-Lingual Publishing Pack
I have searched the forums for an answer to my question, but haven’t really found anything that addresses my particular issue.
There’s something I need to do; I have a feeling it might be fairly simple, but I just can’t wrap my mind around how to go about it.
A while back I put together a straightforward trilingual site using the MLP. It involves a book that has been published in three languages, and the author wanted a press page with links to articles about the book. He wanted a separate heading and list for each language. He wanted the titles of the articles left in their original languages (even though the headings are in the language the user has selected). So I felt that the easiest way to go about this was to generate a separate list of links for each language. I have a separate category for each.
The way things are currently set up, when the page loads you see three lists of links. First is the list of links to English-language press, followed by French-language press, followed by Spanish-language press.
The client now wants (and I agree that it’s an excellent idea) the first list to correspond to the language the page loads in. For example, if a user is deemed to be a Francophone or chooses the French version of the site, the French list should come up first on the press page. It doesn’t really matter how the next two lists are ordered, but the appropriate-language list needs to come up first.
It seems like the l10n_if_lang
tag should come into play here. But how to specify that if the language is, say, French, the “french-press” category should come first?
Is there some way I could use custom fields to do what I need to do? Of course, if I go that route I won’t be able to simply organize the lists as links, which seems easiest. Perhaps each list could instead be an article.
Any advice or could someone point me in the right direction? Thanks in advance. The site currently runs on 4.0.7.
Offline
#1370 2009-09-07 17:11:14
- vandamar
- Guest
Re: MLP - The Multi-Lingual Publishing Pack
Hi Els.
I have uninstalled and reinstalled MLP multiple times with no success. I have also erased all my other plugins to see if this was a cross-plugin interference. It still doesn’t work.
The only other thing I can think of is I have not applied the patch mentioned here. I don’t know how to do it exactly.
Again I am running mlp-0.9.12-gp on TXP 4.2.0.
Edit: I have even erased TXP fully, did a clean install of TXP and added MLP as the first and only plugin. I am having the same issue as before, I cannot edit Section Title in any language other than English. T_T
Last edited by vandamar (2009-09-09 17:19:58)
#1371 2009-09-07 21:21:15
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: MLP - The Multi-Lingual Publishing Pack
ferenczi wrote:
So I felt that the easiest way to go about this was to generate a separate list of links for each language. I have a separate category for each.
Can you post the code you are using now to render these three lists?
Offline
#1372 2009-09-07 21:55:42
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: MLP - The Multi-Lingual Publishing Pack
vandamar wrote:
I have uninstalled and reinstalled MLP multiple times with no success.
Did you try to change a section title while MLP was disabled? It’s important to know if this was possible, for then we’ll know if MLP is or isn’t the cause.
The only other thing I can think of is I have not applied the patch mentioned here. I don’t know how to do it exactly.
As far as I can see applying the patch to Txp’s original file results in exactly the same file as the one in mlp-0.9.12-gp (I wish someone – Graeme? – would confirm this…) so it shouldn’t make a difference. I’m using the original file that comes with mlp-0.9.12-gp and I can edit section titles.
- are there other places where you can’t edit things? forms? pages?
- what are your user privileges? are you a publisher or something else?
Offline
#1373 2009-09-07 23:03:58
- ferenczi
- Member
- Registered: 2005-01-31
- Posts: 67
Re: MLP - The Multi-Lingual Publishing Pack
Els wrote:
Can you post the code you are using now to render these three lists?
Thanks for the quick response, Els. Here’s how I’ve set it up.
<h2><txp:category name="english-press" title="1" type="link" /></h2>
<txp:linklist break="li" category="english-press" limit="50" sort="linksort desc" wraptag="ul" />
<h2><txp:category name="french-press" title="1" type="link" /></h2>
<txp:linklist break="li" category="french-press" limit="50" sort="linksort desc" wraptag="ul" />
<h2><txp:category name="spanish-press" title="1" type="link" /></h2>
<txp:linklist break="li" category="spanish-press" limit="50" sort="linksort desc" wraptag="ul" />
update
Ah, I think this may be more approachable than I thought at first. I hope I’m on the right track. Lists with conditionals.
another update
Figured it out! Works. I think it was just the fact of posting the question here, which forced me to articulate the problem, and then your question Els, which made me think about it more — and that led me to a conclusion. Thanks again.
Last edited by ferenczi (2009-09-08 03:57:25)
Offline
#1374 2009-09-08 08:04:37
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: MLP - The Multi-Lingual Publishing Pack
ferenczi wrote:
Figured it out! Works.
Great! Now I’m curious how you did it… ;)
Offline
#1375 2009-09-08 08:26:34
- ferenczi
- Member
- Registered: 2005-01-31
- Posts: 67
Re: MLP - The Multi-Lingual Publishing Pack
Totally lo-fi solution and in fact I’m sure there’s a more elegant way.
<txp:l10n_if_lang lang="es-es" wraptag="">
<h2><txp:category name="spanish-press" title="1" type="link" /></h2>
<txp:linklist break="li" category="spanish-press" limit="50" sort="linksort desc" wraptag="ul" />
<h2><txp:category name="english-press" title="1" type="link" /></h2>
<txp:linklist break="li" category="english-press" limit="50" sort="linksort desc" wraptag="ul" />
<h2><txp:category name="french-press" title="1" type="link" /></h2>
<txp:linklist break="li" category="french-press" limit="50" sort="linksort desc" wraptag="ul" />
</txp:l10n_if_lang>
<txp:l10n_if_lang lang="fr-fr" wraptag="">
<h2><txp:category name="french-press" title="1" type="link" /></h2>
<txp:linklist break="li" category="french-press" limit="50" sort="linksort desc" wraptag="ul" />
<h2><txp:category name="english-press" title="1" type="link" /></h2>
<txp:linklist break="li" category="english-press" limit="50" sort="linksort desc" wraptag="ul" />
<h2><txp:category name="spanish-press" title="1" type="link" /></h2>
<txp:linklist break="li" category="spanish-press" limit="50" sort="linksort desc" wraptag="ul" />
</txp:l10n_if_lang>
<txp:else />
<h2><txp:category name="english-press" title="1" type="link" /></h2>
<txp:linklist break="li" category="english-press" limit="50" sort="linksort desc" wraptag="ul" />
<h2><txp:category name="french-press" title="1" type="link" /></h2>
<txp:linklist break="li" category="french-press" limit="50" sort="linksort desc" wraptag="ul" />
<h2><txp:category name="spanish-press" title="1" type="link" /></h2>
<txp:linklist break="li" category="spanish-press" limit="50" sort="linksort desc" wraptag="ul" />
Offline
#1376 2009-09-08 08:35:24
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: MLP - The Multi-Lingual Publishing Pack
Nice! No problem doing it this way if you’ve only got three languages. If I can ever think of a more automated way to do this (don’t know if it exists), I’ll post it here :)
Offline
#1377 2009-09-08 08:39:08
- ferenczi
- Member
- Registered: 2005-01-31
- Posts: 67
Re: MLP - The Multi-Lingual Publishing Pack
Thanks! I do worry that load time may lag a wee bit, looping through all of that. Can’t imagine if there were more languages to worry about.
Offline
#1378 2009-09-10 04:25:00
- vandamar
- Guest
Re: MLP - The Multi-Lingual Publishing Pack
Did you try to change a section title while MLP was disabled? It’s important to know if this was possible, for then we’ll know if MLP is or isn’t the cause.
Yes I was able to change a Section Title while MLP was disabled.
With MLP active I can change the English Section Title only, but not the alternative Section titles for the other languages.
* are there other places where you can’t edit things? forms? pages?
I can edit everything else just fine. Forms, Pages all good. I can also successfully input/ edit/ save Article Category Titles in all languages (en, de, ro).
* what are your user privileges? are you a publisher or something else?
I am the publisher
Last edited by vandamar (2009-09-10 04:35:29)
#1379 2009-09-15 14:03:17
Re: MLP - The Multi-Lingual Publishing Pack
Trying MLP for the first time, on a site running 4.2.0. I’ve followed the instructions in the readme file, and once I activate the l10n plugin and click on the Content tab.
I’m using gbp_admin_library 0.4.1, l10n 0.9.12-gp, zem_contact_lang-mlp 4.0.3.6-ML. I also have adi_menu, ied_hide_in_admin, rah_sitemap, tru_tags, zem_contact_reborn installed, and was using aro_myadmin, but turned it prior to upgrading to 4.2.0.
With the txplib_db.php file from 0.9.11 or 0.9.12 I get the following error:
A problem occured while loading the plugin: l10n -> Warning: include_once(home/lreynolds/almex.lsquareddesign.ca/textpattern/lib/l10n_base.php) [function.include-once]: failed to open stream: No such file or directory on line 326
textpattern/lib/txplib_misc.php(594) : eval()'d code:326 include_once()
textpattern/lib/txplib_misc.php:594 eval()
textpattern/index.php:117 load_plugins()
A problem occured while loading the plugin: l10n -> Warning: include_once() [function.include]: Failed opening 'home/lreynolds/almex.lsquareddesign.ca/textpattern/lib/l10n_base.php' for inclusion (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php') on line 326
textpattern/lib/txplib_misc.php(594) : eval()'d code:326 include_once()
textpattern/lib/txplib_misc.php:594 eval()
textpattern/index.php:117 load_plugins()
A problem occured while loading the plugin: l10n -> Warning: include_once(home/lreynolds/almex.lsquareddesign.ca/textpattern/lib/l10n_admin_classes.php) [function.include-once]: failed to open stream: No such file or directory on line 358
textpattern/lib/txplib_misc.php(594) : eval()'d code:358 include_once()
textpattern/lib/txplib_misc.php:594 eval()
textpattern/index.php:117 load_plugins()
A problem occured while loading the plugin: l10n -> Warning: include_once() [function.include]: Failed opening 'home/lreynolds/almex.lsquareddesign.ca/textpattern/lib/l10n_admin_classes.php' for inclusion (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php') on line 358
textpattern/lib/txplib_misc.php(594) : eval()'d code:358 include_once()
textpattern/lib/txplib_misc.php:594 eval()
textpattern/index.php:117 load_plugins()
Fatal error: Class 'MLPPlugin' not found in /home/lreynolds/almex.lsquareddesign.ca/textpattern/lib/txplib_misc.php(594) : eval()'d code on line 359
If I patch the file with mlp-txplib_db-4.2.0rc.patch I get the following error:
A problem occured while loading the plugin: l10n -> Warning: include_once(home/lreynolds/almex.lsquareddesign.ca/textpattern/lib/l10n_base.php) [function.include-once]: failed to open stream: No such file or directory on line 326
textpattern/lib/txplib_misc.php(594) : eval()'d code:326 include_once()
textpattern/lib/txplib_misc.php:594 eval()
textpattern/index.php:117 load_plugins()
A problem occured while loading the plugin: l10n -> Warning: include_once() [function.include]: Failed opening 'home/lreynolds/almex.lsquareddesign.ca/textpattern/lib/l10n_base.php' for inclusion (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php') on line 326
textpattern/lib/txplib_misc.php(594) : eval()'d code:326 include_once()
textpattern/lib/txplib_misc.php:594 eval()
textpattern/index.php:117 load_plugins()
Fatal error: Call to undefined function l10n_installed() in /home/lreynolds/almex.lsquareddesign.ca/textpattern/lib/txplib_misc.php(594) : eval()'d code on line 335
Any ideas?
Offline
#1380 2009-09-15 19:16:30
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: MLP - The Multi-Lingual Publishing Pack
Did you doublecheck if you copied all files to the /textpattern/lib/ folder?
|-- lib (files used by the l10n pluign)
|
|-- ** l10n_langs.php (ISO codes and names)
|-- txplib_db.php (modified db layer supporting MLP)
|-- l10n_base.php (the basic public+admin file)
|-- l10n_admin.php (extra admin routines)
|-- l10n_admin_classes.php (classes used only admin side)
|-- ** l10n_default_strings.php (Declares which language file to use by default)
|-- ** l10n_en-gb_strings.php (English (GB) strings for MLP Pack)
|-- ** l10n_el-gr_strings.php (Greek strings for MLP Pack)
Someone had the same errors a while ago, added ‘solved’ to the post but forgot to tell how it was solved… If all else fails, you could try and email this user to ask how he/she solved it.
I don’t think it causes these errors, but do you have both zem_contact_lang and zem_contact_lang-mlp installed and activated? You can’t have both, so you’d have to remove zem_contact_lang.
Offline