Page MenuHomePhabricator

cli installer ignores lang parameter
Open, MediumPublic

Description

The param --lang in the CLI installer should be used to set $wgLanguageCode in the generated LocalSettings.php.

Currently it is taken into account to print output of the CLI installer in the given language and to generate the main page in the given language (its title and content).


From https://www.mediawiki.org/wiki/Thread:Project:Support_desk/Unable_to_set_the_site_language_using_command_line_installer

I'm trying to install MediaWiki 1.21.5 using command line installer. So I
launch the install.php script:

  php ./maintenance/install.php --dbname my_wiki --dbtype postgres --dbuser \
     postgres --dbpass postgres --lang ru --pass 123 --scriptpath /mediawiki \
     --server http://localhost MyWiki admin

The '--lang' param seems to have no effect. After the installation completes
the 'LocalSettings.php' file has default language code param
$wgLanguageCode = "en". How do I change it during the command line
installation?

Version: 1.21.x to 1.33.x
Severity: normal

Details

Reference
bz61146

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:56 AM
bzimport set Reference to bz61146.
bzimport added a subscriber: Unknown Object (MLST).
Seb35 subscribed.

Still an issue on MediaWiki 1.33-alpha, although I rewrote a bit the description because indeed the CLI installer does not set $wgLanguageCode in the generated LocalSettings.php, but the parameter --lang does have an effect because the main page (title and content) is generated using the lang parameter (e.g. Accueil for --lang fr).