Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#709 2008-04-24 18:27:01

azw
Member
Registered: 2007-01-29
Posts: 279

Re: MLP - The Multi-Lingual Publishing Pack

Does anyone have a French language pack for MLP for both of these?
l10n [admin]
zem_contact_lang-mlp [public]

Maniqui, does your Spanish language pack include the lIOn Admin strings in Spanish?

We need a common place from which we can download the language packs. I think NetCarver’s site would be the logical place, if he’d be open to that.

Last edited by azw (2008-04-24 18:46:20)

Offline

#710 2008-04-24 18:48:37

michaelb
Member
From: London, UK
Registered: 2008-04-02
Posts: 21

Re: MLP - The Multi-Lingual Publishing Pack

I think you’d be able to find a french translation for the zem_contact_lang text here?

http://www.fpradignac.com/atelier/?id=37&c=A-TXP

Offline

#711 2008-04-25 06:02:06

azw
Member
Registered: 2007-01-29
Posts: 279

Re: MLP - The Multi-Lingual Publishing Pack

Hi, Michael, thanks for the answer. That was helpful.

I used a handy online decoder and, yes, it has the terms I’ll need. Fantastic! (In fact, the layout of the decoder is better than what you’ll see here.)

<?php
//———————————————————————————//
// This file has been decoded with ort_plugindecode.php //
//———————————————————————————//

#$plugin[‘name’] = ‘zem_contact_lang’;
$plugin[‘version’] = ’4.0.3.03.B’;
$plugin[‘author’] = ‘f.pradignac’;
$plugin[‘author_uri’] = ‘http://www.fpradignac.com/’;
$plugin[‘description’] = ‘Multiple languages plug-in for Zem Contact Reborn’;
$plugin[‘type’] = ‘0’;
$plugin[‘allow_html_help’] = ‘’;

if (!defined(‘txpinterface’)) @include_once(‘zem_tpl.php’);

if(0){
?>

  1. —- BEGIN PLUGIN HELP —- <h1 style=“color:maroon;”>:: Zem Contact Lang ::</h1>

<p>This is a separate language plug-in for use with Zem Contact Reborn. Both plug-ins need to be installed and activated in order to work properly.</p>

<p>Separating the language in this way will enable non-english and non-french users to update the main plug-in without affecting their “localisation”.</p>

<h1 style=“color:maroon;”>:: Localisation ::</h1>

<h2 style=“color:maroon;”>This plug-in gives you an English and a French localisation</h2>

<p>The default language is english and you can call the french one with :</p>

<code>&lt;txp:zem_contact_reborn trad=“fr” /&gt;</code>

<p>Throughout the zem_contact_reborn plug-in, use has been made of a separate gTxt function which you can see in this plug-in’s code by clicking on the “Edit” button.</p>

<p>If you are using the plug-in for a non-english or non-french site you can make use of this to localise text outputs for your preferred language.</p>

<p>You should only add a new “case” for your language : copy or use the case “new-language” :</p>

<code>case ‘new-language’://case for a new localisation<br />
$lang = array(<br />
‘name’=&gt; ‘your localisation’,<br />
‘checkbox’=&gt; ‘your localisation’,<br />
‘contact’=&gt; ‘your localisation’,<br />
‘email’=&gt; ‘your localisation’,<br />
…<br />
…<br />
…<br />
‘to_missing’=&gt; ‘your localisation’<br />
);<br />
break;</code>

<p>and call it in your form :</p>

<code>&lt;txp:zem_contact_reborn trad=“new-language” /&gt;</code>

<p>where <strong>new-language</strong> is your language, ex : sp, nl, etc.</p>

<p><small><em>This is the hacked version of <strong>zem_contact_lang 4.0.3.03</strong></em></small></p>

  1. —- END PLUGIN HELP —-
    <?php
    }
  2. —- BEGIN PLUGIN CODE —-
    function zem_contact_gTxt($what, $var1 = ‘’, $var2 = ‘’)
    {
    switch($GLOBALS[‘trad’]) {
    case ‘new-language’: //case for a new localisation $lang = array( ‘name’ => ‘Name’, ‘checkbox’ => ‘Checkbox’, ‘contact’ => ‘Contact’, ‘email’ => ‘Email’, ‘email_subject’ => “$var1 > Inquiry”, ‘email_thanks’ => ‘Thank you, your message has been sent.’, ‘field_missing’ => “Required field, “<strong>$var1</strong>”, is missing.”, ‘form_expired’ => ‘The form has expired, please try again.’, ‘general_inquiry’ => ‘General inquiry’, ‘invalid_email’ => ““<strong>$var1</strong>” is not a valid email address.”, ‘invalid_host’ => ““<strong>$var1</strong>” is not a valid email host.”, ‘invalid_value’ => “Invalid value for “<strong>$var1</strong>”, “<strong>$var2</strong>” is not one of the available options.”, ‘mail_sorry’ => ‘Sorry, unable to send email.’, ‘message’ => ‘Message’, ‘min_warning’ => ““<strong>$var1</strong>” must contain at least $var2 characters.”, ‘option’ => ‘Option’, ‘radio’ => ‘Radio’, ‘receiver’ => ‘Receiver’, ‘send’ => ‘Send’, ‘spam’ => ‘We do not accept spam thankyou!’, ‘text’ => ‘Text’, ‘to’ => ‘No “<strong>to</strong>” email address specified.’, ‘to_missing’ => ‘“<strong>To</strong>” address is missing.’ );
    break;
    case ‘fr’: $lang = array( ‘name’ => “Nom”, ‘checkbox’ => “Case &agrave; cocher”, ‘contact’ => “Contact”, ‘email’ => “Email”, ‘email_subject’ => “$var1 > Demande”, ‘email_thanks’ => “Merci, votre message a &eacute;t&eacute; envoy&eacute;.”, ‘field_missing’ => “Le champ “<strong>$var1</strong>” est vide.”, ‘form_expired’ => “Ce formulaire a expir&eacute, merci de recommencer.”, ‘general_inquiry’ => “Demande principale”, ‘invalid_email’ => ““<strong>$var1</strong>” n’est pas une adresse email valide.”, ‘invalid_host’ => ““<strong>$var1</strong>” n’est pas un h&eacute;bergeur valide.”, ‘invalid_value’ => “Valeur invalide pour “<strong>$var1</strong>”, “<strong>$var2</strong>” n’est pas une des options propos&eacute;es.”, ‘mail_sorry’ => “D&eacute;sol&eacute;, impossible d’envoyer cet email.”, ‘message’ => “Message”, ‘min_warning’ => ““<strong>$var1</strong>” n&eacute;cessite au moins $var2 charact&egrave;res.”, ‘option’ => “Option”, ‘radio’ => “Radio”, ‘receiver’ => “Destinataire”, ‘send’ => “Envoyer”, ‘spam’ => “Nous n’acceptons pas les spam, MERCI !”, ‘text’ => “Texte”, ‘to’ => “Pas d’email indiqu&eacute; pour “<strong>to</strong>”.”, ‘to_missing’ => “Il manque l’adresse pour “<strong>To</strong>”.” );
    break;
    default : $lang = array( ‘name’ => ‘Name’, ‘checkbox’ => ‘Checkbox’, ‘contact’ => ‘Contact’, ‘email’ => ‘Email’, ‘email_subject’ => “$var1 > Inquiry”, ‘email_thanks’ => ‘Thank you, your message has been sent.’, ‘field_missing’ => “Required field, “<strong>$var1</strong>”, is missing.”, ‘form_expired’ => ‘The form has expired, please try again.’, ‘general_inquiry’ => ‘General inquiry’, ‘invalid_email’ => ““<strong>$var1</strong>” is not a valid email address.”, ‘invalid_host’ => ““<strong>$var1</strong>” is not a valid email host.”, ‘invalid_value’ => “Invalid value for “<strong>$var1</strong>”, “<strong>$var2</strong>” is not one of the available options.”, ‘mail_sorry’ => ‘Sorry, unable to send email.’, ‘message’ => ‘Message’, ‘min_warning’ => ““<strong>$var1</strong>” must contain at least $var2 characters.”, ‘option’ => ‘Option’, ‘radio’ => ‘Radio’, ‘receiver’ => ‘Receiver’, ‘send’ => ‘Send’, ‘spam’ => ‘We do not accept spam thankyou!’, ‘text’ => ‘Text’, ‘to’ => ‘No “<strong>to</strong>” email address specified.’, ‘to_missing’ => ‘“<strong>To</strong>” address is missing.’ );
    break;
    }

return $lang[$what];
}

  1. —- END PLUGIN CODE —-
    ?>

Offline

#712 2008-04-25 17:24:36

FireFusion
Member
Registered: 2005-05-10
Posts: 698

Re: MLP - The Multi-Lingual Publishing Pack

My RSS Feeds are asking the user to doman the file. Why is this?

Offline

#713 2008-04-26 10:28:59

FireFusion
Member
Registered: 2005-05-10
Posts: 698

Re: MLP - The Multi-Lingual Publishing Pack

One of my staff writers created an article in German (not the primary language) then I told him to delete it. The article remains on the pulic site but has disappeared from the back end. We get the following errors in the backend when trying to get the article by it’s ID.

Notice: Undefined index: l10n_lang in /users/home/path/to/file/web/public/textpattern/lib/l10n_admin.php on line 371

Notice: Undefined index: l10n_group in /users/home/path/to/file/web/public/textpattern/lib/l10n_admin.php on line 372

Notice: Undefined index: AuthorID in /users/home/path/to/file/web/public/textpattern/lib/l10n_admin.php on line 373

Notice: Undefined variable: Status in /users/home/path/to/file/web/public/textpattern/include/txp_article.php on line 283

Notice: Undefined variable: sPosted in /users/home/path/to/file/web/public/textpattern/include/txp_article.php on line 320

that’s just a snippet of the errors

Offline

#714 2008-04-27 02:01:39

azw
Member
Registered: 2007-01-29
Posts: 279

Re: MLP - The Multi-Lingual Publishing Pack

Hi, Fire Fusion, I’m not up on RSS, so I can’t add anything about that, but my first guess would be that the page is not available on the server, but is still in your computer’s cache. The ways to clear the cache depends on the browser you’re using.

I’m pretty sure I’ve have seen another exchange on this thread about a similar problem, so if clearing the cache doesn’t work you may want to do a google search or read through the posts to see what it said.

Offline

#715 2008-04-27 15:11:30

FireFusion
Member
Registered: 2005-05-10
Posts: 698

Re: MLP - The Multi-Lingual Publishing Pack

Can anyone think of a workaround for not supporting two variations of the same language?

Such as these two

zh-cn'=>'中文(简体)' , 'zh-tw'=>'中文(國語)'

I thought of making using a different language and renaming it but for some reason it seems I can’t. I was able to rename English (GB) to just English though.

Very odd.

Last edited by FireFusion (2008-04-27 15:15:07)

Offline

#716 2008-04-27 15:24:34

azw
Member
Registered: 2007-01-29
Posts: 279

Re: MLP - The Multi-Lingual Publishing Pack

FireFusion, I’ve just tested my installation by requesting a non-existent page. Those are exactly the results I get. So I think your problem is as I said above: that page is still in your cache, but it’s not in the database. Textpattern is working fine.

Offline

#717 2008-04-27 15:55:10

azw
Member
Registered: 2007-01-29
Posts: 279

Re: MLP - The Multi-Lingual Publishing Pack

In the backend, go to Content > MLP > Preferences. There you should list only the languages you want to support. If you don’t want one of the Chinese variations, delete it. That should keep it from appearing in sites controlled by MLP.

But you should to use the long form of the language in that list. So you should use something like:

Language: en-us, en-gb, zh-tw

… but whatever languages you want to use. (I’m taking a guess at which version of Chinese you wanted to shorten the name of. You should change it as needed.)

You also have to install each language you want to use in the backend on the Admin > Preferences > Languages page.

Then in a text editor, you edit the file: textpattern/lib/l10n-langs.php.

You can shorten it to just the langs you’ll be using, something like this:

<?php
global $iso_693_langs;
$iso_693_langs = array(
	'en'=>array( 'en'=>'English' , 'en-gb'=>'English (GB)' , 'en-us'=>'English' ),
	'zh'=>array( 'zh'=>'中文' , 'zh-cn'=>'中文(简体)' , 'zh-tw'=>'中文' )
	);
?>

In that file, I change the name of some of the languages so they have simple titles (in this example: ‘en-us’=>‘English’, zh=>‘中文(简体)’and zh-wh=>‘中文(简体)’.
Just for comparison, I think originally these lines were:

	'en'=>array( 'en'=>'English' , 'en-gb'=>'English (GB)' , 'en-us'=>'English (US)' ),
	'zh'=>array( 'zh'=>'中文(简体)' , 'zh-cn'=>'中文(简体)' , 'zh-tw'=>'中文(國語)' )

You can list more languages in l10n-langs than you’re using, but I think that any languages you want to use has to be listed there.

In your case, I’d change ‘zh-tw’=>‘中文(國語)’ to ‘zh-tw’=>‘中文’, or the other one, depending on which you want to shorten, but I’d probably keep the other one there in it’s long form.

Note that each time you update Textpattern, you’ll need to redo or reinstall this file, so make a backup copy with a different name so it won’t get over-written when you upgrade.

Offline

#718 2008-04-29 08:51:58

FireFusion
Member
Registered: 2005-05-10
Posts: 698

Re: MLP - The Multi-Lingual Publishing Pack

That worked. Thanks azw!

I have another problem now though. In Portuguese snippets aren’t showing the text i’ve entered. All other languages work fine but Portuguese shows stuff like pdf-downloads. Even though there is definitely a translation in that language.

:-P

Offline

#719 2008-04-29 18:50:11

FireFusion
Member
Registered: 2005-05-10
Posts: 698

Re: MLP - The Multi-Lingual Publishing Pack

Some how there are two version of Portuguese and the snippet box for the version i’m using isn’t showing up on all snippets.

pt-pt and pt-br

pt-pt is the one I want

Last edited by FireFusion (2008-04-29 18:54:08)

Offline

#720 2008-04-29 20:10:47

azw
Member
Registered: 2007-01-29
Posts: 279

Re: MLP - The Multi-Lingual Publishing Pack

I was writing a response when I saw your new message. I’ll reply again in a minute, but these were my thoughts after your first message.

Have you cleared the cache?

One thing I noticed is that sometimes there are similar names for snippets that say almost the same thing. One may be from the contact For some reasons I have two versions of a snippet.

I’d do a search for “missing renditions in…” on this page: Content > MLP > Snippets > Search.

Then I’d make sure that I’ve spelled the name of the snippet correctly by looking at the snippets in the form on one of these two pages:
Content > MLP > Snippets > Pages
Content > MLP > Snippets > Forms

Near the top of those pages you’ll see a link for “ Show Statistics >>” and one that says “Edit page: [your page name or form name] >>”. You can click on Edit page/form to see the code.

Also, whenever possible, you should use Textpattern’s text tag rather than MLP’s snippet tag. In only one case have I had to use the MLP snippet. The Txp tag looks like this: <txp:text item=”[your-snippet-name]” />.

Offline

Board footer

Powered by FluxBB