Set language with WPLANG.

git-svn-id: https://develop.svn.wordpress.org/trunk@1177 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2004-04-26 02:00:08 +00:00
parent 40d0872459
commit 78a793d2ea
2 changed files with 17 additions and 3 deletions

View File

@ -12,6 +12,12 @@ define('DB_HOST', 'localhost'); // 99% chance you won't need to change this
$table_prefix = 'wp_'; // example: 'wp_' or 'b2' or 'mylogin_'
// Change this to localize WordPress. A corresponding MO file for the
// chosen language must be installed to wp-includes/languages.
// For example, install de.mo to wp-includes/languages and set WPLANG to 'de'
// to enable German lanuage support.
define ('WPLANG', '');
/* Stop editing */
$server = DB_HOST;
@ -23,4 +29,4 @@ define('ABSPATH', dirname(__FILE__).'/');
// Get everything else
require_once(ABSPATH.'wp-settings.php');
?>
?>

View File

@ -1,8 +1,16 @@
<?php
$curpath = dirname(__FILE__).'/';
// The locale is hard-coded here for now.
$locale = 'en_US';
$locale = '';
// WPLANG is defined in wp-config.
if (defined('WPLANG')) {
$locale = WPLANG;
}
if (empty($locale)) {
$locale = 'en_US';
}
$mofile = $curpath . "/languages/$locale.mo";