[wp-trac] [WordPress Trac] #7515: Allow customization (translation) of setup-config.php

WordPress Trac wp-trac at lists.automattic.com
Wed Aug 13 18:28:07 GMT 2008


#7515: Allow customization (translation) of setup-config.php
-------------------------+--------------------------------------------------
 Reporter:  thomask      |       Owner:  anonymous
     Type:  enhancement  |      Status:  new      
 Priority:  normal       |   Milestone:  2.7      
Component:  i18n         |     Version:           
 Severity:  trivial      |    Keywords:           
-------------------------+--------------------------------------------------
 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):
 1. after checking if exist the wp-config-sample.php file (row 12-15) try
 to parse it

 include ('../wp-config-sample.php');

 2. 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)

 3. (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"
 />

 put

 <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)

-- 
Ticket URL: <http://trac.wordpress.org/ticket/7515>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list