[wp-polyglots] Setting installation defaults in localization files
Nikolay Bachiyski
nbachiyski at developer.bg
Fri Jan 11 15:21:41 GMT 2008
2008/1/4, Ran Yaniv Hartstein <ran at ranh.co.il>:
> Is there a way to set different default values for various variables that
> get set during installation in the localization files?
>
> For e.g., for the Hebrew localization, I change 'start_of_week' to '0' (the
> first day of the week in Israel in Sunday), 'rss_language' to 'he' and
> 'gmt_offset' to '2'.
>
> Currently, I do this by editing the wp-admin/includes/schema.php. Is there a
> way of setting these values in the localization files (the locale.php file)?
There is. First, add he.php in wp-content/languages and inside you
can add the option when we are currently installing WordPress only:
if (defined('WP_INSTALLING')) {
add_option('start_of_week', 0);
}
This file is loaded before the actual installation takes place, so the
option is not added by the code in schema.php.
Happy hacking,
Nikolay.
More information about the wp-polyglots
mailing list