www.delorie.com/gnu/docs/units/units_9.html   search  
Buy GNU books!

Units: A Unit Conversion Program

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

9. Localization

Some units have different values in different locations. The localization feature accomodates this by allowing the units database to specify region dependent definitions. A locale region in the units database begins with `!locale' followed by the name of the locale. The leading `!' must appear in the first column of the units database. The locale region is terminated by `!endlocale'. The following example shows how to define a couple units in a locale.

!locale en_GB
ton                     brton
gallon                  brgallon

The current locale is specified by the LOCALE environment variable. Note that the `-c' option only checks the definitions which are active for the current locale.

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003