What do LANG, LANGUAGE and LC_* environment variables mean?

219 篇文章 2 订阅

https://access.redhat.com/solutions/1351023

 SOLUTION IN PROGRESS 

This solution is in progress and will be completed soon for Red Hat customers.

- 已更新 2015年二月17日17:33 - 

English 

环境

  • Red Hat Enterprise Linux 6
  • glibc

问题

  • What do LANG, LANGUAGE and LC_* environment variables mean?

决议

  • Some of LC_* variables are defined in an ISO document.
    Following sentecnes are quoted from man page and the ISO document.

    • LANG (see 'man bash')

      Raw

      Used to determine the locale category for any category not specifically selected with a variable  starting with LC_.
      
    • LC_ALL (see 'man bash')

      Raw

      This variable overrides the value of LANG and any other LC_ variable specifying a locale category.
      
    • LC_COLLATE (see 'man bash' or 'man 7 locale')

      Raw

      This  variable  determines  the collation order used when sorting the results of pathname expansion, and
      determines the behavior of range expressions, equivalence classes, and collating sequences within  path-
      name expansion and pattern matching.
      
    • LC_CTYPE (see 'man bash' or 'man 7 locale')

      Raw

      This  variable  determines the interpretation of characters and the behavior of character classes within 
      pathname expansion and pattern matching.
      
    • LC_MESSAGES (see 'man bash' or 'man 7 locale')

      Raw

      This variable determines the locale used to translate double-quoted strings preceded by a $.
      
    • LC_NAME

      Raw

      The LC_NAME category defines formats to be used in addressing a person, e.g. in a postal
      address or in a letter. 
      
    • LC_NUMERIC (see 'man bash' or 'man 7 locale')

      Raw

      This variable determines the locale category used for number formatting.
      
    • LC_MONETARY (see 'man 7 locale' or 'man 5 locale'')

      Raw

      changes the information returned by localeconv(3) which describes the way numbers are  usually  printed,
      with  details  such  as  decimal point versus decimal comma.  This information is internally used by the
      function strfmon(3).
      
    • LC_TIME (see 'man 7 locale' or 'man 5 locale')

      Raw

      changes  the  behavior  of  the strftime(3) function to display the current time in a locally acceptable
      form; for example, most of Europe uses a 24-hour clock versus the  12-hour  clock  used  in  the  United
      States.
      
    • LANGUAGE (see 'info gettext')

      Raw

      While for the `LC_xxx' variables the value should consist of exactly
      one specification of a locale the `LANGUAGE' variable's value can
      consist of a colon separated list of locale names.  The attentive
      reader will realize that this is the way we manage to implement one of
      our additional demands above: we want to be able to specify an ordered
      list of language.
      
    • LC_PAPER (see 'man paperconf')

      Raw

      When called without arguments, paperconf prints the name of the  sys-
      tem-  or  user-specified paper, obtained by looking in order at the PAPERSIZE environment variable, at the con-
      tents of the file specified by the PAPERCONF environment variable, at the contents of the file /etc/papersize ,
      consulting  the  values  controlled  by the LC_PAPER locale setting, or by using letter as a fall-back value if
      none of the other alternatives are successful.
      
    • LC_ADDRESS (see ISO document)

      Raw

      The LC_ADDRESS category defines formats to be used in specifying a location like a
      person’s home or office, for use in a postal address or in a letter, and other items related to
      geography, including natural language. All keywords are strings and may contain non-
      digits, and all keywords are optional. T
      
    • LC_TELEPHONE (see ISO document)

      Raw

      The LC_TELEPHONE category defines formats to be used with telephone services. All
      keywords are optional. The strings are not restricted in what characters they can contain.
      
    • LC_MEASUREMENT (see ISO document)

      Raw

      The LC_MEASUREMENT category specified which measurement system to use. It had
      the "copy" keyword and the keyword "measurement" with 3 possible values: 1 - the ISO
      1000 system, 2 - the U.S.A. system, 3 - other. The "i18n" FDCC-set had the
      "measurement" set to 1, reflecting use of ISO 1000 measurements. T
      
    • LC_IDENTIFICATION (see ISO document)

      Raw

      The LC_IDENTIFICATION category defines properties of the FDCC-set, and which
      specification methods the FDCC-set is conforming to. Values must be supplied for all
      unless otherwise noted, and the operands are strings. 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值