By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,652 Members | 1,358 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,652 IT Pros & Developers. It's quick & easy.

problem with "setlocale"

P: n/a
Hi Everybody

Why the following script return NULL?

this is the following:
<?php

var_dump ( setlocale(LC_ALL, "pl") );

?>

this is the return:

bool(false)

I use:
1. apache2
2. Ubuntu 6.06 LTS - Dapper Drake

When I execute 'locale' in my terminal I return the following
messages:

rob$ locale
LANG=pl_PL.UTF-8
LANGUAGE=pl_PL:pl:en_GB:en
LC_CTYPE="pl_PL.UTF-8"
LC_NUMERIC="pl_PL.UTF-8"
LC_TIME="pl_PL.UTF-8"
LC_COLLATE="pl_PL.UTF-8"
LC_MONETARY="pl_PL.UTF-8"
LC_MESSAGES="pl_PL.UTF-8"
LC_PAPER="pl_PL.UTF-8"
LC_NAME="pl_PL.UTF-8"
LC_ADDRESS="pl_PL.UTF-8"
LC_TELEPHONE="pl_PL.UTF-8"
LC_MEASUREMENT="pl_PL.UTF-8"
LC_IDENTIFICATION="pl_PL.UTF-8"
LC_ALL=

rob$locale -a | grep PL
pl_PL.utf8

Any suggestion or comments is greatly appreciated.
Robert.

Jul 7 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Jul 7, 10:48 am, robert.szczepan...@gmail.com wrote:
Hi Everybody

Why the following script return NULL?

this is the following:
<?php

var_dump ( setlocale(LC_ALL, "pl") );

?>

this is the return:

bool(false)

I use:
1. apache2
2. Ubuntu 6.06 LTS - Dapper Drake

When I execute 'locale' in my terminal I return the following
messages:

rob$ locale
LANG=pl_PL.UTF-8
LANGUAGE=pl_PL:pl:en_GB:en
LC_CTYPE="pl_PL.UTF-8"
LC_NUMERIC="pl_PL.UTF-8"
LC_TIME="pl_PL.UTF-8"
LC_COLLATE="pl_PL.UTF-8"
LC_MONETARY="pl_PL.UTF-8"
LC_MESSAGES="pl_PL.UTF-8"
LC_PAPER="pl_PL.UTF-8"
LC_NAME="pl_PL.UTF-8"
LC_ADDRESS="pl_PL.UTF-8"
LC_TELEPHONE="pl_PL.UTF-8"
LC_MEASUREMENT="pl_PL.UTF-8"
LC_IDENTIFICATION="pl_PL.UTF-8"
LC_ALL=

rob$locale -a | grep PL
pl_PL.utf8

Any suggestion or comments is greatly appreciated.
Robert.
You're trying to set the locale to "pl" which doesn't exist on your
system (as you've shown us). Try setting it to "pl_PL.utf8" instead.

Jul 7 '07 #2

P: n/a
Try using 'pl_PL.utf8' as the locale id.

On Jul 7, 10:48 am, robert.szczepan...@gmail.com wrote:
Hi Everybody

Why the following script return NULL?

this is the following:
<?php

var_dump ( setlocale(LC_ALL, "pl") );

?>

this is the return:

bool(false)

I use:
1. apache2
2. Ubuntu 6.06 LTS - Dapper Drake

When I execute 'locale' in my terminal I return the following
messages:

rob$ locale
LANG=pl_PL.UTF-8
LANGUAGE=pl_PL:pl:en_GB:en
LC_CTYPE="pl_PL.UTF-8"
LC_NUMERIC="pl_PL.UTF-8"
LC_TIME="pl_PL.UTF-8"
LC_COLLATE="pl_PL.UTF-8"
LC_MONETARY="pl_PL.UTF-8"
LC_MESSAGES="pl_PL.UTF-8"
LC_PAPER="pl_PL.UTF-8"
LC_NAME="pl_PL.UTF-8"
LC_ADDRESS="pl_PL.UTF-8"
LC_TELEPHONE="pl_PL.UTF-8"
LC_MEASUREMENT="pl_PL.UTF-8"
LC_IDENTIFICATION="pl_PL.UTF-8"
LC_ALL=

rob$locale -a | grep PL
pl_PL.utf8

Any suggestion or comments is greatly appreciated.
Robert.

Jul 7 '07 #3

P: n/a
Thenk You for help!

Robert.

Jul 8 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.