WackoWiki: Proposed Specifications For Languages Holding

https://wackowiki.org/doc     Version: 27.02.2016 07:24
Users[link3]/DidierSpaier[link4]/ProposedSpecificationsForLanguagesHolding
Warning. This document is a draft

Purpose of this document

This document is intended as a proposal to clarify in which language the texts included in WackoWiki's user interface (abbreviated as UI in this document) should be displayed.

Of course we are speaking about the texts displayed by the application (WackoWiki) itself, not about the content of the pages as edited by the end users (abbreviated as EU in this document).

How it works now: some reminders

Files containing the translated texts for each language

In order for WackoWiki to be multilingual at the UI level, it has to have a specific version of (every, if possible) text to display for each available language.

Implementation in WackoWiki:

Please note that in languages files some texts can stay untranslated; in that case the English text will probably be used, as generally the translator uses the English file as a template.

What is at present considered to determine the language to be used to display texts

To determine in which language it should display each text, WackoWiki takes into account several factors:
  1. the "multilanguage" setting in wakka.config.php (the configuration file of WackoWiki)
  2. the default "language" setting in config.inc.php
  3. the available language files in the lang directory
  4. the fact that the user be anonymous or logged in 
  5. if the user is logged in, his/her preferred language, as set-up through the UserSettings function
  6. if present, the first two characters of the HTTP accept_language header (c.f. RFC 2616 § 14.4 Accept-Language) supplied by the client. In our case, the client is the browser used by the EU. Note that in some browsers — e.g. Firefox or Opera — the EU can set up a parameter according to which the header is built, in others — e.g. Konqueror — he/she can't

Proposed specification

Rationale

Let's bear in mind that:

Note. For now the UI can be monolingual or multilingual but as stated above my recommendation is that in a _not_so_distant_future_ the UI be multilingual, period. For that reason:
  1. among the following proposed rules, those which apply to "not multilingual" wikis will be obsoleted if/wen all wiki will be multilingual
  2. this apply as well to the proposed implementation
  3. one of the intents of that proposed implementation is to ease the transition

Proposed rules

Overview

Proposed implementation

Warning. In some case this proposal is consistent with the way things work in 4.3RC1, in others it is not. I didn't check that for now; a fortiori the amount of work necessary to implement it is unknown at this stage.


User initially logged inEvent Language to be used after that event and until next event
NBeginning of a sessionThe first language with q=1 indicated in the HTTP accept-language value if available, else the language corresponding to the value of the "language" parameter in the configuration file
YBeginning of a sessionThe last language chosen by the user
Y/NClosing of the sessionN/A
NLog inThe last language chosen by the user
YLog outThe first language with q=1 indicated in the HTTP accept-language value if available, else the language corresponding to the value of the "language" parameter in the configuration file
Y/NUser choose a languageThe language chosen by the user

Notes.