The VectorLanguageInHeader config flag allows the language to be in the header for all users or not at all. We want to expand this to support logged-in users.
Currently:
"VectorLanguageInHeader": { "value": false, "description": "@var boolean Moves the language links from the sidebar into a menu beside the page title. Also moves the indicators to the line below, next to the tagline (siteSub)." },
Proposed - we will follow the example inside MobileFrontend and allow feature flags to be configurable for logged in users as well as all users:
"VectorLanguageInHeader": { "value": { "stable": false, "loggedin": true }, "description": "@var boolean Moves the language links from the sidebar into a menu beside the page title. Also moves the indicators to the line below, next to the tagline (siteSub)." },
Acceptance criteria
- It should be possible to enable VectorLanguageInHeader for all users
- Given VectorLanguageInHeader is currently configured to true in certain wikis, please make sure the case where the value is a boolean is handled.
- In future all new features will be built this way. Please take time to think about what architecture changes would be needed and write up the work needed into a new task.
QA Steps
- In a local dev environment, the new language button can be tested by adding different values to $wgVectorLanguageInHeader in LocalSettings.php i.e.
$wgVectorLanguageInHeader = true; //$wgVectorLanguageInHeader = false; //$wgVectorLanguageInHeader = [ // "logged_in" => true, // "logged_out" => false //]; //$wgVectorLanguageInHeader = [ // "logged_in" => false, // "logged_out" => true //];
- Navigate to a page (with content provider enabled) in the browser to verify that the language list is either in the sidebar or in the header, for both logged in and logged out states, based on the values for $wgVectorLanguageInHeader in your LocalSettings.php. Note that when $wgVectorLanguageInHeader is a boolean value, this value will apply to both logged in and logged out states in order to accommodate legacy config.