LC_ALL & LANG are set OK, but others couldn't set locale correctly.
Hi,
I have a Solaris (SunOS 5.10) installed, by default with the en_AU.UTF-8 locale. I want to change it to en_US.UTF-8
With AU, I have no issues whatsoever, so I installed the language package and now locale -a shows "en_US.UTF-8".
Problem is even with LC_ALL set in etc/default/init, the others LC_* default to "C" after a reboot and throw up the "couldn't set locale correctly" error. I've added each LC_* manually to the init file but get the same result so I've removed those.
Below are some outputs I'm getting. Tried everything I can think of/google.
I'm new to Solaris/Unix so try to keep answers simple and step by step. Any help would be appreciated !
I'm using Linux-Mandrake 8.0 in my laptop. After I logged in as a "root", I added a new path in my .bashrc file (I use bash shell). Then I can observe it has been set correctly by typing echo $PATH.
But, when I log in again as a personal account, not "root", then I open my bash shell, and type... (5 Replies)
When a user connects via ssh to one of out Sun V120 boxes the following message is displayed.
"couldn't set locale correctly"
The .profile has the following line
# @(#)local.profile 1.6 98/02/06 SMI
stty istrip
stty erase ^H
So I put a set -x in the .profile and re sourced it and... (1 Reply)
When logging into solaris box through ssh, my profile does not get set correctly and I'm presented with the default ksh prompt "$".
When logging in through telnet, everything is set correctly. Is there a special profile that sshd runs?
ssh2: F-Secure SSH 2.4.0 (build 15) on sparc-sun-solaris2.8 (0 Replies)
When I login to my AIX server, the LANG variable is automatically being set to En_US. This is causing locale warning messages when I run emacs or perl. The reason seems to be that En_US is not a valid locale (seen by running locale -a).
I can change the variable from the command line (export... (3 Replies)
Hi,
I need to set a locale to my linux machine which has redhat enterprise linux 4
how should I do that.
And also when i did locale -a, I have got three versions for each locale type
with different .extensions like utf8,iso88951 and soon
which file should I use for setting locale.
... (1 Reply)
hi All,
I'm using sun OS 5.10.
All locales are set to en_US.ISO8859-1 in /etc/profile/init file.
I'm using one functional user.When I tried to "sesu - functionalUser",its giving me error like "Couldn't set locale correctly".In functional user profile i'm tring to set locales to en_US.After... (1 Reply)
Hello,
I have a recently configured machine that when log into it as a user or remotely as root it displays "Couldn't set locale correctly"
When I type locale it displays the below which is wrong compared to other machines
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"... (7 Replies)
Dear All,
I Have problem at my console (Ultra 24, solaris 10 x86), when i type dmesg always come out :
like this
You have new mail.
root@console # bash
root@console # dmesg
couldn't set locale correctly
couldn't set locale correctly
So how to fix it...?
Best Regards
simbah (3 Replies)
Pls help me to set the japanese locale in Solaris 10. I have checked JP locale has been already installed on Solaris BOX.
Thanks,
Karan N (2 Replies)
Discussion started by: nirka01
2 Replies
LEARN ABOUT PHP
datefmt_get_locale
DATEFMT_GET_LOCALE(3) 1 DATEFMT_GET_LOCALE(3)IntlDateFormatter::getLocale - Get the locale used by formatter
Object oriented style
SYNOPSIS
public string IntlDateFormatter::getLocale ([int $which])
DESCRIPTION
Procedural style
string datefmt_get_locale (IntlDateFormatter $fmt, [int $which])
Get locale used by the formatter.
PARAMETERS
o $fmt
- The formatter resource
o $hich
- You can choose between valid and actual locale ( Locale::VALID_LOCALE, Locale::ACTUAL_LOCALE, respectively). The default is the
actual locale.
RETURN VALUES
the locale of this formatter or 'false' if error
EXAMPLES
Example #1
datefmt_get_locale(3) example
<?php
$fmt = datefmt_create(
'en_US',
IntlDateFormatter::FULL,
IntlDateFormatter::FULL,
'America/Los_Angeles',
IntlDateFormatter::GREGORIAN
);
echo 'locale of the formatter is : " . datefmt_get_locale($fmt);
echo 'First Formatted output is " . datefmt_format($fmt, 0);
$fmt = datefmt_create(
'de-DE',
IntlDateFormatter::FULL,
IntlDateFormatter::FULL,
'America/Los_Angeles',
IntlDateFormatter::GREGORIAN
);
echo 'locale of the formatter is : ' . datefmt_get_locale($fmt);
echo 'Second Formatted output is ' . datefmt_format($fmt, 0);
?>
Example #2
OO example
<?php
$fmt = new IntlDateFormatter(
'en_US',
IntlDateFormatter::FULL,
IntlDateFormatter::FULL,
'America/Los_Angeles',
IntlDateFormatter::GREGORIAN
);
echo 'locale of the formatter is : ' . $fmt->getLocale();
echo 'First Formatted output is ' . $fmt->format(0);
$fmt = new IntlDateFormatter(
'de-DE',
IntlDateFormatter::FULL,
IntlDateFormatter::FULL,
'America/Los_Angeles',
IntlDateFormatter::GREGORIAN
);
echo 'locale of the formatter is : ' . $fmt->getLocale();
echo 'Second Formatted output is ' . $fmt->format(0);
?>
The above example will output:
locale of the formatter is : en
First Formatted output is Wednesday, December 31, 1969 4:00:00 PM PT
locale of the formatter is : de
Second Formatted output is Mittwoch, 31. Dezember 1969 16:00 Uhr GMT-08:00
SEE ALSO datefmt_create(3).
PHP Documentation Group DATEFMT_GET_LOCALE(3)