Allow customization (translation) of setup-config.php
|Reported by:||thomask||Owned by:||anonymous|
Wordpress install is almost full customizable thanks to install.php option in /wp-content and also fully translatable, when you have the WPINC/registration.php strings translated in your .mo file and WP-LANG defined in your wp-config-sample file. The only problem is setup-config.php page (the first page where you need to fill your database etc. settings so wp-config file can be made out of wp-config-sample.
It is logic as when you do not yet have wp-config, you do not know the language. But it is also agains full customization of install and (more important) of full translation.
My idea (changes in wp-config.php file):
- after checking if exist the wp-config-sample.php file (row 12-15) try to parse it
- put all strings to _e() functions (and now the translation is complete, only the row 12 where you do not have even wp-config-sample.php must stay english only)
- (optional) check if the any of the desired $variables are allready set, if so, then use them as a predefined values for the setup form (row 77 to 97), e.g.
in place of
<input name="dbname" id="dbname" type="text" size="25" value="wordpress" />
<input name="dbname" id="dbname" type="text" size="25" value="<?php ($DB_NAME) ? $DB_NAME : _e('wordpress'); ?>" />
This could allow full translation and partialy customisation. More customisation would be if at the begining of the file would be something like
if ( file_exists(ABSPATH . 'wp-content/wp-config.php') )
require (ABSPATH . 'wp-content/wp-config.php');
and everything in wp-config file would be in functions with function_exist check, so those functions could be fully owerwritten (as we can do no with install.php)