1 #!/bin/sh 2 # 3 # CDDL HEADER START 4 # 5 # The contents of this file are subject to the terms of the 6 # Common Development and Distribution License, Version 1.0 only 7 # (the "License"). You may not use this file except in compliance 8 # with the License. 9 # 10 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 11 # or http://www.opensolaris.org/os/licensing. 12 # See the License for the specific language governing permissions 13 # and limitations under the License. 14 # 15 # When distributing Covered Code, include this CDDL HEADER in each 16 # file and include the License file at usr/src/OPENSOLARIS.LICENSE. 17 # If applicable, add the following below this CDDL HEADER, with the 18 # fields enclosed by brackets "[]" replaced with your own identifying 19 # information: Portions Copyright [yyyy] [name of copyright owner] 20 # 21 # CDDL HEADER END 22 # 23 # 24 # Copyright 2009 Sun Microsystems, Inc. All rights reserved. 25 # Use is subject to license terms. 26 # 27 28 29 if [ "x$LC_ALL" = x -a "x$LANG" = x -o "x$LANG" = xC ]; then 30 : 31 else 32 # Uncomment if you need 6757628 33 # European locales have LC_MESSAGES=C in /etc/default/init 34 # LC_MESSAGES=$LANG; export LC_MESSAGES 35 : 36 fi 37 38 # To determine the character set used for filenames with 39 # glib's g_filename_to/from_utf8() functions, we set the 40 # environment variables G_FILENAME_ENCODING and G_BROKEN_FILENAMES. 41 # 42 # G_BROKEN_FILENAMES, when set, lets the functions take the 43 # character set for the current locale for filename's encoding. 44 # 45 # G_FILENAME_ENCODING, which is introduced to glib 2.3.x and later, may be 46 # set to a comma-separated list of character set names. 47 # The special token "@locale" is taken to mean the character set 48 # for the current locale. The first character set from the list is taken 49 # as the filename encoding. 50 # 51 # If G_FILENAME_ENCODING is not set, but G_BROKEN_FILENAMES is, the 52 # character set of the current locale is taken as the filename encoding. 53 54 G_BROKEN_FILENAMES=yes 55 export G_BROKEN_FILENAMES 56 G_FILENAME_ENCODING=@locale,UTF-8 57 export G_FILENAME_ENCODING 58 59 # Fixes 6583891 60 case $LANG in 61 ja*) VTE_CJK_WIDTH=1; export VTE_CJK_WIDTH;; 62 ko*) VTE_CJK_WIDTH=1; export VTE_CJK_WIDTH;; 63 zh*) VTE_CJK_WIDTH=1; export VTE_CJK_WIDTH;; 64 *) ;; 65 esac 66 67 # Fixes 6555226 68 if [ "x$LANG" = "xzh" ] ; then 69 LANGUAGE=zh:zh_CN.EUC 70 export LANGUAGE 71 fi 72 73 # Locale specific .desktop files 74 if [ -d /usr/share/locale/$LANG/xdg ] ; then 75 XDG_DATA_DIRS=${XDG_DATA_DIRS:-"/usr/share"} 76 XDG_DATA_DIRS=${XDG_DATA_DIRS}:/usr/share/locale/$LANG/xdg 77 export XDG_DATA_DIRS 78 fi 79 80