Extension talk:Polyglot/Archive

Bug report
I tried to use your extension by creating a page XYZ/de in addition to a page called XYZ, and the link I get in the 'in other languages' is showing the text "De:XYZ/de", and points to the "De:XYZ/de" page, which obviously is wrong.

Note that I am using MW 1.9.2.


 * Yes, this will not work in 1.9; I'm overriding MediaWiki's default handling of interlanguage-links using a hook that doesn't yet exist in 1.9 -- Duesentrieb ⇌ 20:32, 25 April 2007 (UTC)

Warning related to $wgPolyglotLanguages
Hi, the extension give me a Warning if  (default setting). The warning is: Warning: array_keys [function.array-keys]: The first argument should be an array in mywikipath/extensions/Polyglot/Polyglot.php  on line 80 Using MW 1.15.1 --Dvdgmz 09:12, 24 July 2009 (UTC)


 * So try  instead. --Eric Myers 14:59, 24 July 2009 (UTC)

Switching vom Events/de to Events/th
If I for example select a page "Events" with language "de" it is redirected to "Events/de" as expected, but if I than change the the language to "th" I expect to see page "Events/th", but that doesn't work. I have to return to "Events" to get "Events/th". Is it possible to automatically cut off the language code if it already exist to allow a switch from one language to another?
 * No, because that would make it impossible to look at, say, the th page when your interface is de. All pages must be accessible somehow to everyone, otherwise things get confusing, and hard to maintain. The "main" page basically serves as a magic redirect that simply "knows" where the user wants to go. Treat it like that and all should be fine. -- Duesentrieb ⇌ 13:11, 8 June 2007 (UTC)
 * I made a patchfile, which tries to solve this thing. It relies on Extension:LanguageSelector, maybe another extension will solve this too. It detects a languagechange und removes the old language extension of the page. http://paste-it.net/public/v7b0a57/ (I know this is an old topic but I had the same problem) CKing --89.246.44.23 11:19, 2 November 2010 (UTC)

Display all possible Languages?
For a multi-language wiki with a limited number of available languages, it would be nice to have the language selector appear all the time, with all languages, non-exitant pages in red. This way we would know what articles in which language are still missing and could simply click the red link to create them.

To do this, modify polyglot.php as follows:

find $links[$lang] = $t->getFullText; and remove the if clause in front of it This does cancle the check for existing sites, all links to all possibly available languages are added.

ToDo
1 Missing languages are not yet displayed red: 'class' => 'new' has to be added to the links, if if (!$nt->exists)

2 All languages, including the main language are linked with /language to a subpage. Polyglot displays a link to Main_page/de and Main_Page/en on the main Page, even if Main_Page is english and no link to a sub-page is needed.

MediaWiki 1.12
To bring this to live in 1.12 you've to replace MWNAMESPACE by MAMESPACE (see http://www.mediawiki.org/wiki/Release_notes/1.13) --Venia 07:25, 11 February 2009 (UTC)


 * If you use the Version of Polyglot designated fopr 1.12, that should automatically be the case. Or did I get confused somewhere? -- 217.234.233.168 09:22, 11 February 2009 (UTC)


 * Ok, if I'd realized this it would work without a patch... --Venia 10:37, 11 February 2009 (UTC)

Transclusion
When transcluding the language is not taken in account.

If I have articles "page one" and "page one/en" each one with the contents for portuguese (original wiki language) and english (for our english speaker customers). And yes they both have the same name in portuguese and english so redirects will not solve this problem.

Then I have this article "all pages" which transcludes all the pages kinda like: ==Page one==

==Page two==

and so on... But when showing the page in english(the other language) the transcluded contents are the original(portuguese) ones, to have the page in english I would have to write the "all pages/en" with: ==Page one==

==Page two==

and so on... Is there another way? A flag or hack inside the extension code to handle transcluded article translation?

Rafael Vargas 14:27, 30 September 2009 (UTC)


 * Rafael, if you have ParserFunction installed and Subpages enabled you can try to do this:

==Page one==


 * Where you are making a transclusion or other depending on the subpagename of the page where your code is placed.


 * --Dvdgmz 07:55, 1 October 2009 (UTC)

mediawiki user language recognition
added some code so that it redirects the user based on its browsers language settings: http://thomasfischer.biz/?p=347

Title l10n
G'day, and thx a lot for this really useful extension. I have an issue with the title localisation: I have set up $wfPolyglotFollowRedirects, but I don't see any difference with a normal #redirect. My main wiki is in french, and I'd like to redirect Accueil/en to Main_Page, and when I'm in Main_Page, have an automatique link to the french page Accueil (and other languages if available). Is it possible ?

For the moment, I have a normal redirect: so I have an automatic link to Accueil/en wich redirect to Main_Page, but when I'm in Main_Page it's like a normal french article (i.e.: without automatic link to Accueil). Not sure to be clear enough ^^

Goffi 15:16, 10 December 2010 (UTC)