Extension talk:LanguageSelector/LQT Archive 1

LANGUAGE_SELECTOR_AS_PORTLET
Hello,

I have install this very interresting extension on my Wiki. And I wanted to use the value "LANGUAGE_SELECTOR_AS_PORTLET" for "$wgLanguageSelectorLocation" but it doesn't run. I use a Skin based on Monbook. Only values LANGUAGE_SELECTOR_AT_TOP_OF_TEXT and LANGUAGE_SELECTOR_IN_TOOLBOX can run on my Wiki. I don't know if I have to change some values on LanguageSelector.php?

(I'm sorry for my english, but I'm a french student!) Sébastien 14:22, 6 April 2007 (UTC)


 * The other options only work with MediaWiki 1.10 and newer. You can add support for this by hacking the SkinTemplate.php file: near the end of the outputPage function, before // execute template, add this:

// original version by hansm if( !wfRunHooks( 'SkinTemplateOutputPageBeforeExec', array( &$this, &$tpl ) ) ) { wfDebug( __METHOD__ . ': Hook SkinTemplateOutputPageBeforeExec broke outputPage execution!' ); }
 * well, just this would probably do:

wfRunHooks( 'SkinTemplateOutputPageBeforeExec', array( $this, $tpl );
 * No guarantee, though. Perhaps just wait a few days for MW 1.10 to come out officially. -- Duesentrieb ⇌ 21:04, 6 April 2007 (UTC)


 * Thank you for your quick help, now I can use this attribute on my Wiki v1.8.3. Sébastien 07:07, 10 April 2007 (UTC)

Bug with LANGUAGE_SELECTOR_INTO_TITLE
LANGUAGE_SELECTOR_INTO_TITLE does not work with MediaWiki 1.10alpha (r19865). It just displays the raw HTML data instead of the box itself. The source code of the page contains things like: &lt;span id=&quot;languageselector-box-1&quot; class=&quot;languageselector &quot; style=&quot;&quot;&gt; instead of Please look into the page source in order to see the difference. ;-) I couldn't find out what is going wrong in the extensions. :-( Arnomane 18:06, 27 May 2007 (UTC)

Same problem happens with 1.11alpha (r22507) too (SVN checkout from today). So I guess it is not an incompatibility in an older MediaWiki version but a bug in the extension. Arnomane 14:18, 28 May 2007 (UTC)

MediaWiki: 1.11alpha
Extension is broken, at least since r23511.

Invalid NULL return from broken hook wfLanguageSelectorSkinTemplateOutputPageBeforeExec

Backtrace:


 * 1) 0 /home2/web/w/includes/SkinTemplate.php(457): wfRunHooks('SkinTemplateOut...', Array)
 * 2) 1 /home2/web/w/includes/OutputPage.php(695): SkinTemplate->outputPage(Object(OutputPage))
 * 3) 2 /home2/web/w/includes/Wiki.php(307): OutputPage->output
 * 4) 3 /home2/web/index.php(90): MediaWiki->finalCleanup(Array, Object(LoadBalancer), Object(OutputPage))
 * 5) 4 {main}

LanguageSelector.php, line 215: -       return; +       return true;

fixs this.
 * Done. Aaron 17:04, 26 July 2007 (UTC)

How can make it works?
Hello, I think this extension is really good for my wiki. but, It doesn't work.

Here is the way i was installed.

1. copied languageselector.php to extentions/LanguageSelector/

2. add require_once( "$IP/extensions/LanguageSelector/LanguageSelector.php" ); to my localsetting.php

and I have some error messages above the wiki like,

'''Warning: array_keys [function.array-keys]: The first argument should be an array in /home/webhost/hansco/public_html/wiki-en/extensions/LanguageSelector/LanguageSelector.php on line 82

Warning: Invalid argument supplied for foreach in /home/webhost/hansco/public_html/wiki-en/extensions/LanguageSelector/LanguageSelector.php on line 290

Warning: Invalid argument supplied for foreach in /home/webhost/hansco/public_html/wiki-en/extensions/LanguageSelector/LanguageSelector.php on line 339'''

is there anyawy to make it work correctly?

I saw the way to configure the detail option about it. but I don't know exactly how...

I thought I can use default setting (without any edit except add "require_once" line into Localsetting.php) ...

Is there any simple way to use this extension??

Sorry about my poor English..


 * make sure you include the extension near the end of your LocalSettings.php - do not put custom settings at the top.
 * If that doesn't fix it, i don't know what is wrong - basically, it complains about wgLanguageNames being null - which can't happen, really. At least i don't know how it could. -- Duesentrieb ⇌ 11:04, 22 July 2007 (UTC)
 * I have exactly the same problem :-( SPQRobin 19:27, 7 August 2007 (UTC)
 * I have put it at the last line, just before, and now it works. Strange :-S SPQRobin 20:32, 7 August 2007 (UTC)

Shorter list & how to call it only when needed in certain pages
Hi, great extension! It works fine for my wiki with the default settings (all languages, and at top of text) but when I try to make a shorter list (English and Spanish only) it says:

Warning: Invalid argument supplied for foreach in /home/.munchie/mansalva/estigmergia.net/w/extensions/LanguageSelector.php on line 290

And the same for line 339

This happens when I've tried $wgLanguageSelectorLanguages = 'English','Spanish'; (and 'en','es';) but it doesn't work :(

Also, I wonder how to call the menu only when needed in the wiki: is it with LANGUAGE_SELECTOR_MANUAL ? What code would I have to write in the content of the page where I need it to appear? --Esenabre 23:39, 22 July 2007 (UTC)

Hello, with regards to the shorter list, I've managed to make it work by adding the following at the end of my LocalSettings.php. (Everything else is default installation - Only worked using monobook skin.)

$wgLanguageSelectorLocation = LANGUAGE_SELECTOR_IN_TOOLBOX;

$wgLanguageSelectorLanguages = array("en", "es", "fr");

--200.89.181.5 04:12, 2 August 2007 (UTC)

LANGUAGE_SELECTOR_AS_PORTLET for one page
Is it possible to set "LANGUAGE_SELECTOR_AS_PORTLET" only for one page? Thank you, SPQRobin 13:21, 27 September 2007 (UTC)

Reload?
I've got two problems with the LanguageSelector. It's a great extension, but I'm not sure what I'm doing wrong...

First I get the Error "Fatal error: Call to undefined function wfLoadExtensionMessages in ...\extensions\LanguageSelector\LanguageSelector.php on line 82

I've downloaded the file "ExtensionFunctions.php" and copied it in my extensions-folder. Still the error. So I tried just to comment this line 82 out. Now the extension works pretty fine. Now I've got another problem, I has to click twice on the language to change it, oder reload after choosing a language. Is this the problem of the cache you indicated or is this because I uncommented line 82 or another problem? How can I make it working correctly?

Thanks for help, would be a great extension!

bluerouse
 * You should upgrade to MediaWiki 1.11. Lower versions do not have the method wfLoadExtensionMessages. Siebrand 23:21, 21 February 2008 (UTC)