Divide by Zero
Divide by Zero

Reputation: 1474

Custom Skin: How to get Languages into MediaWiki Sidebar?

I have got a Wiki, with multiple languages, and a custom Skin. My Sidebar is 100% custom-made. I want to get the Language box in there. If someone uses this markup:

[[iwcode:Pagename]]

I want the link and corresponding Language name to pop up in there. How do i get it into my HTML code?

Please help me!

Best regards, Max

Upvotes: 0

Views: 125

Answers (1)

leo
leo

Reputation: 8520

Inside your skin class, yuou should have access to the iw links through $this->data['language_urls']. If you want the links in your sidebar, you can just copy the code from the other skins:

    echo "<ul>";
    foreach ( $this->data['language_urls'] as $key => $langLink ) {
        echo $this->makeListItem( $key, $langLink );
    }
    echo "</ul>";

Upvotes: 1

Related Questions