User:SPQRobin/Page language

As part of Extension:Translate/Usability improvements 2014.


 * PCL = page content language

Backend basics:
 * Assumption 1: PCL should be defined in the database.
 * Assumption 2: PCL is a property of a page, not of a specific revision.
 * The value is obviously a language code.

Other backend:
 * How to handle the default value? Should we include a selector option "Use default language", which would be what getPageLanguage returns normally?
 * How does it interact with other PCL definitions, especially the hook (by which extensions, like Translate, can alter the PCL. Do they need to be able to disable setting the PCL through the selector?
 * A way to define the PCL as the user language ($wgLang)? E.g. value "user" in DB, instead of a language code.

Maybe a selector with options
 * Use default page content language
 * Use user interface language
 * (languages...)

Implementation
I have a basic idea currently:
 * Having a SQL entry with the page language. I think it should be possible to change it in a particular revision.
 * The language if not set should be the default wiki language.
 * There should be an API method also for getting the page language.

GUI

 * Setting the value by using something similar to the Universal Language Selector. --User:Kunalgrover05

Progress

 * Discarded the idea of page_props- Aim is to build a system which is a fundamental property of the page similar to ID.
 * Understood the working of databases. Set up a new entry in the database in the pages table. Working only with MySQL currently.
 * Currently working on a function to update the value of the page language for all the existing Wiki pages.

Further tasks

 * Build an interface to enter language while creating a page and store in database.
 * Trying to integrate the interface with Universal Language selector.
 * Remove redundant language code in the core.
 * Add the same functions to Postgres|SQLite|Mssql|Oracle