MediaWiki talk:Multilingual-link.js

From Wikisource
(Redirected from User:Doug/oldws)
Jump to navigation Jump to search

Linking to Old Wikisource[edit]

Due to a bug, interwiki language links in the sidebar linking to the multilingual wikisource do not work in the normal form, i.e. placing [[oldwikisource:Main page]] on the page, will not create a sidebar link to the multilingual wikisource main page, but rather an ordinary interwiki link, identical to the behavior expected from [[:oldwikisource:Main page]] (compare oldwikisource:Main page to oldwikisource:Main page).

A work around java script has been created and imported into the common.js: {{MediaWiki:Multilingual-link.js}}. Links can be created in the language sidebar to old wikisource (http://wikisource.org) using this tool. To create a link, create an additional language link for example from page Foo in any subdomain:

[[ar:oldws marker]] <!--the name is not important, this is just to identify it-->
[[ar:فو]] <!--an ordinary language link to arabic wikisource-->
[[az:foo]] 
...

The language chosen doesn't matter but it should normally be placed at the top above ar:.

Additionally, the following, either as html or as a template must be added:

<span class="interwiki-oldws" id="ar1" title="Foo" style="display:none;"/>

This would link to the same place as the inline link oldwikisource:Foo. The title is the full page name, i.e. the page title including the namespace, e.g. "Author:Hermann Hesse".

Thus the page will appear as follows in edit mode:

<references/>
[[category:foo]]
<!--Interwiki Language Links-->
<span class="interwiki-oldws" id="ar1" title="Foo" style="display:none;"/>
[[ar:oldws marker]]
[[ar:فو]]
[[az:foo]]
. . . .

N.B. It is generally agreed that the correct name for wikisource.org is the "multilingual wikisource" not "old wikisource", which is considered derogatory. However, this script uses the outdated reference to "old" to avoid breaking existing instances of the script call.