Re: mrbs little problem
John Beranek <john.beranek <at> pace.co.uk>
2002-05-07 12:16:39 GMT
I wrote:
> On Thu, 2002-05-02 at 14:29, Eric wrote:
>
>>Hi i'am french and i like your script .
>>Sorry for my bad english :)
>>So i send you this mail to know how can we change ( convert in french
>>language) month and day ?
>>Example:
>>Convert september to septembre in french
>>and sunday to dimanche..
>>etc ..
>
> John.
>
> P.S. If you _really_ want to change the default language, you can change
> the line in config.inc that reads "include 'lang.en'" to "include
> 'lang.fr'"
Oh, and you'd also need to comment out a few lines, and change one more
line...so you'd end up with something like the below. Note, however, that
this completely removes the auto language switching functionality of MRBS.
John.
##########
# Language
##########
# Change the en below to the code for your language - if
# there is a language file for it.
include 'lang.fr';
# We also want to do locales for Dates/Times etc.
# Use the setlocale() function for this.
# Define the default locale here. For a list of supported
# locales on your system do "locale -a"
setlocale('LC_ALL','fr_FR');
# We attempt to make up a sensible locale from the HTTP_ACCEPT_LANGUAGE
# environment variable. If this doesn't work for you, comment it out
# and assign locale directly.
# If HTTP_ACCEPT_LANGUAGE is a comma-separated list, take the first one.
#$locale = ereg_replace(",.*", "", getenv('HTTP_ACCEPT_LANGUAGE'));
# These two lines import a language based on what the client
# is using. Comment them out to disable this.
#$lang_file = "lang.". strtolower(substr($locale,0,2));
#if (file_exists($lang_file)) {include $lang_file;}
#
# Convert locale=xx to xx_XX; this is not correct for some locales???
#if (strlen($locale) == 2) {
# $locale = strtolower($locale)."_".strtoupper($locale);
#} else {
# $locale =
#strtolower(substr($locale,0,2))."_".strtoupper(substr($locale,3,2));
#}
#setlocale('LC_ALL',$locale);
--
--
John Beranek, Senior Software Engineer
Pace Micro Technology plc. (Cambridge) Tel: +44 1223 518561
645 Newmarket Road, Fax: +44 1223 518526
Cambridge, CB5 8PB, UK. Web: http://www.pace.co.uk/