Wikiversity:Language select

From Wikiversity
Jump to navigation Jump to search

Other languages:
Deutsch • ‎English • ‎Ripoarisch • ‎Türkçe • ‎Zazaki • ‎dansk • ‎español • ‎français • ‎no • ‎português • ‎română • ‎svenska • ‎Ελληνικά • ‎ਪੰਜਾਬੀ • ‎中文 • ‎日本語

For a more detailed version about this feature, see Meta:Language select.


Language select allows users to hide foreign languages on multilingual pages. This would, for example, allow a French reader to see only French text on multilingual pages (though they would still see Spanish on a Spanish-only page).

How to select a language[edit]

  • To select a language, enter its ISO 639-1 code in the input box (en for English), and click on .
  • If you want to display all languages, type mul or click on .

Usage[edit]

Identifying multilingual pages[edit]

Pages that implement language selection include a notice using {{multilingual}}.


JavaScript[edit]

The JavaScript method is activated by default on Wikiversity Beta. You can disable it by adding the following line to your script file.

ls_enable = false;

You can see an example of the JavaScript in action below. If language selection is disabled, all of the text will be displayed.

العربية: هذا النص بالعربيه.
български: Този текст е на български език.
català: Aquest text és en català.
Deutsch: Dieser Text ist Deutsch.
Ελληνικά: Αυτό το κείμενο είναι ελληνικά.
English: This text is English.
Tiếng Việt: Đây là tiếng Việt.
français: Ce texte est Français.
italiano: Questo testo è italiano.
日本語: この文章は日本語です。
한국어: 이 본문 한국어 이다.
Latina: Haec nota Latine scriptus est.
македонски: Овој текст е на македонски.
Nederlands: Deze tekst is Nederlands.
ਪੰਜਾਬੀ: ਇਹ ਟੈਕਸਟ ਪੰਜਾਬੀ ਵਿੱਚ ਹੈ।
português: Este texto está em Português.
sardu: Custu testu est in Sardu.
русский: Этот текст — на русском языке.
Türkçe: Bu metin Türkçe'dir.
中文: 这些文字是中文。

You can view the JavaScript code at MediaWiki:Monobook.js.

Delimiting languages[edit]

The template {{ls}} simplifies the implementation of language select.

{{ls|en|This text is English.}}