Subject: What is the locale setting (e.g. en-gb)?

Posted on: 09/04/09 05:49am
By: LWC

What does it actually do? I've noticed it can be defined both for the general site and for RSS feeds.

The example in config.html is names of months. But aren't those hardcoded within each language file's $LANG_MONTH? And pretty much every other locale setting (including timezone) is also hardcoded from within the very same locale settings.

What else is there but en-gb anyway and how can I know how it differs?

Re: What is the locale setting (e.g. en-gb)?

Posted on: 19/05/09 02:29am
By: LWC

Bump. Frown

Re: What is the locale setting (e.g. en-gb)?

Posted on: 19/05/09 03:27am
By: 1000ideen

I can only give you an example from my German sites. I don`t notice if I have the correct de_DE.UTF-8 setting until there are months where I have special characters like März. Then the date in "Welcome to Geeklog" is shown incorrectely.

Re: What is the locale setting (e.g. en-gb)?

Posted on: 19/05/09 06:47am
By: beewee

:rtfm: Languages and Locale

Re: What is the locale setting (e.g. en-gb)?

Posted on: 19/05/09 08:53am
By: LWC

:speechless:
Quote by: LWC

The example in config.html is names of months. But aren't...?


Re: What is the locale setting (e.g. en-gb)?

Posted on: 20/05/09 02:34am
By: Anonymous

Hello friends.Nice to meet you back.I have some problem.
The example in config.html is names of months. But aren't those hardcoded within each language file's $LANG_MONTH? And pretty much every other locale setting (including timezone) is also hardcoded from within the very same locale settings.Can anyone help me?
________________________________

Re: What is the locale setting (e.g. en-gb)?

Posted on: 20/05/09 12:51pm
By: 1000ideen

Could you say what your problem is? And could a moderator split up the thread?

Re: What is the locale setting (e.g. en-gb)?

Posted on: 20/05/09 03:03pm
By: ::Ben

Markus,

Our new friend seems to be a robot.

::Ben

Re: What is the locale setting (e.g. en-gb)?

Posted on: 20/05/09 03:24pm
By: Dirk

Quote by: cordiste

Our new friend seems to be a robot


Whoops, good catch. I hadn't realized that he was simply copying the original question. Oh well, just ignore him then.

bye, Dirk

Re: What is the locale setting (e.g. en-gb)?

Posted on: 18/10/09 12:51pm
By: kilerb

Hi, my site is on UTC and I'm on PST... Geeklog 1.5... I went into the config area and found the "Locale" section which is now set to "en_GB..." I clicked the question mark for info and went to the wiki area but still don't know what the different codes are. What would I change en_GB to so that I can get the site on PST? Is there a list somewhere?

Thanks!

Re: What is the locale setting (e.g. en-gb)?

Posted on: 18/10/09 02:17pm
By: LWC

Isn't PST a timezone and not a locale?

Re: What is the locale setting (e.g. en-gb)?

Posted on: 18/10/09 02:40pm
By: kilerb

I think you're right... Smile So how do I get this off UTC time? I figured they were related and controlled one another... Is the system still using the timezone hack that I saw someone posting about for Geeklog 1.3? I thought I read that it changed, but I just don't see where to change it.

Thanks

Re: What is the locale setting (e.g. en-gb)?

Posted on: 18/10/09 02:46pm
By: kilerb

Actually, I'm on GL 1.6, not 1.5 if that makes a difference.

Thanks

Re: What is the locale setting (e.g. en-gb)?

Posted on: 18/10/09 03:04pm
By: ::Ben

Hello,

Did you try Configuration > Languages and Locale > Timezone Enable

then set your timezone (Etc/GMT-2 for exemple).

::Ben

Re: What is the locale setting (e.g. en-gb)?

Posted on: 18/10/09 04:57pm
By: kilerb

Quote by: cordiste

Hello,

Did you try Configuration > Languages and Locale > Timezone Enable

then set your timezone (Etc/GMT-2 for exemple).

::Ben



I just checked it out... It is set for Etc/PST-8 which I believe is correct. I think the only place on my site that shows the time zone is my event manager plugin and that's where it says UTC... Could there be another spot that this finds the time zone?

Thanks

Re: What is the locale setting (e.g. en-gb)?

Posted on: 18/10/09 05:04pm
By: LWC

Look, this is hijiacking this topic (which still awaits answers to the actual topic). Can a moderator split this off-topic discussion into its own topic (this is the second request now)?

Re: What is the locale setting (e.g. en-gb)?

Posted on: 19/10/09 05:39pm
By: Dirk

Quote by: kilerb

I just checked it out... It is set for Etc/PST-8 which I believe is correct. I think the only place on my site that shows the time zone is my event manager plugin and that's where it says UTC... Could there be another spot that this finds the time zone?


So what is your problem now? Geeklog does use the timezone in some of the date stamps (e.g. the one in the welcome message - see just below the header on this site) - is it not correct?

The "timezone hack" that this config option is based on has some limitations (e.g. safe_mode in PHP must be off). I have some code for better timezone report (that requires PHP 5.1 or later). Someone remind me to add that for Geeklog 1.6.1 ...

bye, Dirk

Re: What is the locale setting (e.g. en-gb)?

Posted on: 19/10/09 06:00pm
By: kilerb

Quote by: Dirk

Quote by: kilerb

I just checked it out... It is set for Etc/PST-8 which I believe is correct. I think the only place on my site that shows the time zone is my event manager plugin and that's where it says UTC... Could there be another spot that this finds the time zone?


So what is your problem now? Geeklog does use the timezone in some of the date stamps (e.g. the one in the welcome message - see just below the header on this site) - is it not correct?

The "timezone hack" that this config option is based on has some limitations (e.g. safe_mode in PHP must be off). I have some code for better timezone report (that requires PHP 5.1 or later). Someone remind me to add that for Geeklog 1.6.1 ...

bye, Dirk



Hi Dirk... I actually took the time off the main page because it said UTC... But I have the event manager for members to sign up for events, and that still shows UTC. I'd rather it not say any time zone at all, as everyone on this site is in CA. Here's a small screen capture of the event manager since you won't be able to see it without a login.. http://www.socalstandup.com/problem.gif

Re: What is the locale setting (e.g. en-gb)?

Posted on: 19/10/09 06:13pm
By: Dirk

Okay, so looks like it's not working for you. The original timezone hack discussion is here. The "hack" is built into Geeklog now, but maybe there's something in that discussion that can help you?

Otherwise, you'll have to wait for 1.6.1 (and I meant to write "timezone support" instead of "report" above, of course).

bye, Dirk (sitting in a hotel room in San Francisco, waiting for the rain to stop)

Re: What is the locale setting (e.g. en-gb)?

Posted on: 19/10/09 08:56pm
By: kilerb

Hi Dirk, I've been messing with this thing A LOT...

I just changed the hack code on config.php and libcommon to this...

PHP Formatted Code
$_CONF['timezone']  = 'America/Los_Angeles';

and
[code]if( !empty( $_CONF['timezone'] ) && !ini_get( 'safe_mode' ) &&
function_exists( 'putenv' )) {
putenv( 'TZ=' . $_CONF['timezone'] );
}
$_CONF['timezone'] = 'America/Los_Angeles';


Now it does not say UTC on my events, it now says GMT-6... Which might be Pacific time, I'm not even sure, but is there somewhere I can go in and just make it not show the time zone at all or make it say PST for everything? Pacific Standard Time is where all my users live... It's a CA niche site.

Thanks!

Re: What is the locale setting (e.g. en-gb)?

Posted on: 19/10/09 09:19pm
By: Dirk

Geeklog relies on the server and on PHP for all the time/date related information and functions - there isn't anything in Geeklog that you could tweak.

PST should be UTC-8. Using "PST" as the timezone should also work, actually. If that still gives you odd results, try talking to your hosting service.

bye, Dirk

Re: What is the locale setting (e.g. en-gb)?

Posted on: 19/10/09 09:43pm
By: kilerb

Quote by: Dirk

Geeklog relies on the server and on PHP for all the time/date related information and functions - there isn't anything in Geeklog that you could tweak.

PST should be UTC-8. Using "PST" as the timezone should also work, actually. If that still gives you odd results, try talking to your hosting service.

bye, Dirk



I went back into config.php and lib-common and changed it to both "PST" and also tried "UTC-8" and nothing changed at all... Still says GMT-6 on the event.

I have 2 questions... What should I have it set for in the configuration area if I'm using the hack? Should I disable it in the languages & locales area or put something there? Also, where should lib-common.php be? Is it in the root directory or somewhere in a folder?

Thanks

Re: What is the locale setting (e.g. en-gb)?

Posted on: 20/10/09 12:36am
By: Dirk

I'm confused now. config.php? That's not used any more, so of course changes there won't make a difference.

Also, there is only one lib-common.php and it already has the necessary code built in.

The Timezone entry under "Languages and Locale" in the Configuration is the replacement of the old config.php entry.

bye, Dirk

Re: What is the locale setting (e.g. en-gb)?

Posted on: 20/10/09 01:13am
By: kilerb

Quote by: Dirk

I'm confused now. config.php? That's not used any more, so of course changes there won't make a difference.

Also, there is only one lib-common.php and it already has the necessary code built in.

The Timezone entry under "Languages and Locale" in the Configuration is the replacement of the old config.php entry.

bye, Dirk



Ahhhhh, got it... My config.php did have that timezone hack area on it. That's why I was confused. I copied lip-common.php once to another area. Is that file supposed to be in the layout area or in the root directory?

Thanks!

Re: What is the locale setting (e.g. en-gb)?

Posted on: 20/10/09 01:24am
By: Dirk

Quote by: kilerb

I copied lip-common.php once to another area. Is that file supposed to be in the layout area or in the root directory?


Root directory (where the layout directory is, but not inside of the layout directory).

bye, Dirk

Re: What is the locale setting (e.g. en-gb)?

Posted on: 20/10/09 03:09am
By: kilerb

Quote by: Dirk

Quote by: kilerb

I copied lip-common.php once to another area. Is that file supposed to be in the layout area or in the root directory?


Root directory (where the layout directory is, but not inside of the layout directory).

bye, Dirk



Thanks... After I changed lib-common.php and the languages and locales timezone setting to "US/Pacific" it changed it to PDT.


Re: What is the locale setting (e.g. en-gb)?

Posted on: 20/10/09 03:46am
By: LWC

With that over, I'll get back to the original question:
The example in config.html is names of months. But aren't those hardcoded within each language file's $LANG_MONTH?

Geeklog - Forum
https://www.geeklog.net/forum/viewtopic.php?showtopic=86934