Make WordPress Core

Opened 14 years ago

Closed 11 years ago

#7515 closed enhancement (maybelater)

Allow customization (translation) of setup-config.php

Reported by: thomask's profile thomask Owned by:
Milestone: Priority: normal
Severity: trivial Version:
Component: I18N Keywords: needs-patch
Focuses: Cc:


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

  1. 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)
  1. (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)

Change History (5)

#1 @ryan
14 years ago

  • Milestone changed from 2.7 to 2.8

#2 @sirzooro
13 years ago

  • Cc sirzooro added

I suggest another approach - scan wp-content/languages for files dir and provide user a drop down list with list of supported languages. If there is no translation files, you can display nothing.

13 years ago

  • Milestone changed from 2.8 to Future Release

#4 @Denis-de-Bernardy
13 years ago

  • Keywords needs-patch added

#5 @dd32
11 years ago

  • Milestone Future Release deleted
  • Resolution set to maybelater
  • Status changed from new to closed

Ideally we'd be using the translation functions at this point, but unfortunately at this point in the loading of WordPress, the Translation functions are not defined.

Translated distro's of WordPress ship with hard-translated files for this exact purpose.

Note: See TracTickets for help on using tickets.