IMSLP:Internationalization/Old IFLANG

Free public domain sheet music from IMSLP / Petrucci Music Library
Jump to: navigation, search

Archived information about old IFLANG construct

The IFLANG Construct

I've finally finished making Mediawiki display different templates (or really any page) depending on the browser language request! The result of this is the IFLANG construct, an example of which can be found at the IFLANG testpage. To see how the construct code works, click "edit" on the testpage :)

The default language shown (if there is no match) is the first language in the list. The language code (two letter identifier) used is the standard browser language request code (ISO 639-1), a list of which can be found here. Also note that there should be no space, newline or any other character(s) between the %!IFLANG!%, and the first language header (ex. "(~!en):"), or there will be an error message. Otherwise this construct should be fairly self-explanatory.

If there are any questions, feel free to ask me :) --Feldmahler 03:53, 30 December 2006 (EST)

IFLANG Breakage

Apparently, the old IFLANG format (i.e. !!KEYWORD!!) breaks tables sometimes (don't know why), so I have added a synonym for IFLANG (i.e. %!KEYWORD!%), which can be seen on the IFLANG testpage. It is nice to gradually migrate to %! over time, but there is no rush. Of course, if you are creating a new IFLANG statement, use the %! format. --Feldmahler 11:22, 26 January 2007 (EST)

Personal tools
Variants
Actions
Navigation
Browse scores
Browse recordings
Participate
Other
For iPhone & iPad

Purchase

Toolbox
Associated with