Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Locale Setting

Status
Not open for further replies.

TheBoyMonkey

Programmer
Nov 24, 2003
11
FR
Hi,

I'm trying to set the locale of my Solaris environment to something other than NULL (which it is at present).

I've edited the init file in /usr/etc/default, rebooted, but still the locale remains NULL.

Any ideas?

**************************************************

#ident "@(#)init.dfl 1.6 00/05/27 SMI"
#
# This file is /etc/default/init. /etc/TIMEZONE is a symlink to this file.
# This file looks like a shell script, but it is not. To maintain
# compatibility with old versions of /etc/TIMEZONE, some shell constructs
# (i.e., export commands) are allowed in this file, but are ignored.
#
# Lines of this file should be of the form VAR=value, where VAR is one of
# TZ, LANG, CMASK, or any of the LC_* environment variables.
#
TZ=WET
CMASK=022
LANG=en_GB.ISO8859-15
LC_ALL=en_GB.ISO8859-15

*******************************************

Thanks,
TBM.
 
You can change the default locale system-wide with the following procedure:

1. Edit the /etc/default/init file by adding or changing the line.

Substitute C, zh_TW.BIG5, zh_TW or zh_TW.UTF-8 for locale.

2. Have all users exit the Common Desktop Environment (CDE).
3. Type the following commands:

% su
# /usr/dt/bin/dtconfig -kill

4. # reboot

Mike

"A foolproof method for sculpting an elephant: first, get a huge block of marble, then you chip away everything that doesn't look like an elephant."

 
Thanks. That's exactly the procedure I followed.

Any ideas as to why that might not work?
 
The contents of the TIMEZONE file reflect exactly that of the init file.

Sorry - a little new here - how can I test the symlink is in tact?
 
Are the locales installed?

try locale -a

Create symbolic links between the system locale directories and the product directories. For example, for Japanese:

/usr/lib/locale/jp/LC_MESSAGES/BIPv500.cat ->
/opt/mqsi/messages/Ja_JP/BIPv500.cat
/usr/lib/locale/ja_JP.PCK/LC_MESSAGES/BIPv500.cat ->
/opt/mqsi/messages/Ja_JP/BIPv500.cat

If there are no directories for your chosen language in /usr/lib/locale/, there is an operating system locale problem, and you must reinstall the locale.

Mike

"A foolproof method for sculpting an elephant: first, get a huge block of marble, then you chip away everything that doesn't look like an elephant."

 
The locale is installed and the directory is available in /usr/lib/locale.

It looks as though I don't have a /opt/mqsi folder though. Is this platform dependant / important / named something else?

Thanks,
TBM.
 
The /opt/mqsi was only an example. Give me a few minutes to check my system.

Mike

"A foolproof method for sculpting an elephant: first, get a huge block of marble, then you chip away everything that doesn't look like an elephant."

 
PWD=/home/weblogic/bea/user_projects/domains/<domain>
TZ=WET
HOSTNAME=parmn14
LD_LIBRARY_PATH=/lib:/usr/lib:/usr/ucblib:/u01/app/oracle/product/9.2.0/lib32
PS1=[weblogic@parmn14]$
LD_LIBRARY_PATH_64=/lib:/usr/lib:/usr/ucblib:/u01/app/oracle/product/9.2.0/lib32:/u01/app/oracle/product/9.2.0/lib
USER=weblogic
MACHTYPE=sparc-sun-solaris2.9
LC_ALL=en_GB.ISO8859-15
OLDPWD=/home/weblogic/bea/user_projects/domains
EDITOR=vi
ORACLE_BASE=/u01/app/oracle
JAVA_HOME=/usr/jdk/j2sdk1.4.2_05
ORACLE_HOME=/u01/app/oracle/product/9.2.0
LOGNAME=weblogic
SHLVL=1
SHELL=/usr/bin/bash
HOSTTYPE=sparc
OSTYPE=solaris2.9
HOME=/home/weblogic
TERM=xterm
PATH=/usr/jdk/j2sdk1.4.2_05/bin:/home/weblogic/bin:/usr/bin:/usr/ccs/bin:/usr/ucb:/usr/sbin:/usr/local/bin:/usr/openwin/bin:/usr/local/oracle:/usr/dt/bin:/u01/app/oracle/product/9.2.0/bin
NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P15
SSH_TTY=/dev/pts/2
_=/usr/bin/env


I can set the locale on a per-user basis by editing the .profile files and also on a shell instance basis. Both of which work fine. But I'd like the whole system-wide solution to solve my issue...

Thanks,
TBM.


 
or /etc/default/global - I may be on wrong *nix version

Mike

"A foolproof method for sculpting an elephant: first, get a huge block of marble, then you chip away everything that doesn't look like an elephant."

 
I've updated the etc/profile which updates all the users successfully. Thankyou. Though I'm not sure if it'll have the same effect as a system-wide (don't see why not mind).

My weblogic is still turning nonsense though. :(

Thankyou for all your help today, gents.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top