Template:String/doc

Purpose: Similar to the "  " Mediawiki message function, this is used for displaying translation strings in the preferred language. Behavior is identical to Mediawiki   messages except for the case of logged out users. In this case, messages are not translated to the site default language (english), but instead are displayed in the page language. Logged in users with user preference to a language other than english (en) see all messages in their preferred language regardless of page language. English users who wish to see this same translation behavior for all pages must set their user preference language to en-gb.

Assumes: English String table exists at Strings fm list

Parameter:

Terminology:
 * Page language means the language used in an article
 * User language means the language indicated by the user in Special:Preferences which defaults to English for logged out users.

Q: Translations broken? What is seen: Translations work if the user's language is non english, but if the user's language is English, the labels will not be translated into English.

A: This is intentional. Here's why:
 * When the wikimedia engine tells us the user's language is non English, we can be confident that this is the language the user prefers, because the user would have purposely set that value.
 * Unfortunately this is not the case for English, since a logged out user is assumed by the wikimedia engine to prefer English. This is not a safe assumption for our visitors who want to be able to quickly discover if the site has information relevant to their ancestors.  Familypedia may have an article in the user's language, but because they are not logged in, the labels in the table would be (very unhelpfully) translated back into english.  In most cases, that is not what the logged out user wants.  This is not a problem for english users since for most cases there is already an article in english anyway.  For this reason we instead make the labels in the tables conform to the page's language.    The majority of site hits are from logged out users, so if a Chinese speaking user visits and is looking at a Chinese language page, then that user prefers the labels in the page language (Chinese), not the logged out user language (English).

Therefore,
 * if the user language is non english,
 * infobox and table labels are translated to the user's language.
 * if the user language is (English/logged out user)
 * labels are displayed in the page language.

Why not Mediawiki messages? Rationale in a nutshell: 1) User friendly ability to edit translations, 2) Automatic synchronization. 3) Usage of strings can be tracked What does this mean?
 * 1) Mediawiki message editing is cumbersome. Only administrators can update them.  Using forms, it will be possible to create a friendly user interface for users to add new translations.  Header information can be in the native language of the translator.
 * 2) Synchronization: Because the master list of strings on the english page can be queried from all other pages, it is possible to keep them automatically in sync. When any newly added strings appear on the english page, or items are deleted, all other pages get the changes.
 * 3) Tracking. There is no facility similar to "what links to this page" so that it is possible to determine who if anyone is using a message.  It would be possible to use this template to record which templates if any use a message.