Re: [Phpslash-devel] Locales
Brought to you by:
joestewart,
nhruby
From: Peter C. <pe...@kr...> - 2003-02-24 18:08:06
|
Thanks Matt. So (in summary), it should be enough to change $_PSL['locale']['LC_TIME']? (I've already set up *_CA.LC_TIME.php files). Anyway, I'll have a play around and give you feedback on how I get on. Cheers Peter PS I like your apology for the hegemony in the code :-) At 12:15 24/02/03 -0500, you wrote: >On Mon, 24 Feb 2003, Peter Cruickshank wrote: > >> Hi > >Hi! > >> A couple of questions about time-formatting and locales: >> >> 1. Can someone explain how to switch time-formats? (My example is >> between en_CA and fr_CA when the language changes) > >Look for this part of the INI file: > >[locale] >;; Use this locale for formatting date and time strings >LC_TIME = "en_US" ;; <--- change to whatever you want > >This is a only a server-wide option and not a user option, although >making it one would be a neat bell or whistle. > >For each locale you want to use there needs to be a file >$_PSL['localedir'] . '/' . $locale . '.LC_TIME.php3'. Nobody's gotten >around to Canadian locales. If you want to do it, start by copying >en_GB.LC_TIME.php3 to en_CA.LC_TIME.php3 and refining. Same with fr_FR to >fr_CA. > >> 2. Is this already done by setLang()? > >This is just beyond reach. Right now no assocations exist between >$_PSL['lang'] and $_PSL['locale']['LC_TIME']. One trouble is that there >aren't region-specific language strings yet. There's no fr_CA.php3 file >for pslGetText for example. > >If you want to have them switch simultaneously, you'll have to hack >setLang yourself, by resetting $_PSL['locale']['LC_TIME'] at the same time >as $_PSL['lang']). > >If we had a pslSetLocale function that would accept the LC_ALL option, >that might could help. But that should probably wait until after release. > >--Matt ----------------------------- Peter Cruickshank Tel: +44 7092 086 881 email: pe...@kr... |