Tags

  • AWS (7)
  • Apigee (3)
  • ArchLinux (5)
  • Array (6)
  • Backtracking (6)
  • BinarySearch (6)
  • C++ (19)
  • CI&CD (3)
  • Calculus (2)
  • DesignPattern (43)
  • DisasterRecovery (1)
  • Docker (8)
  • DynamicProgramming (20)
  • FileSystem (11)
  • Frontend (2)
  • FunctionalProgramming (1)
  • GCP (1)
  • Gentoo (6)
  • Git (15)
  • Golang (1)
  • Graph (10)
  • GraphQL (1)
  • Hardware (1)
  • Hash (1)
  • Kafka (1)
  • LinkedList (13)
  • Linux (27)
  • Lodash (2)
  • MacOS (3)
  • Makefile (1)
  • Map (5)
  • MathHistory (1)
  • MySQL (21)
  • Neovim (10)
  • Network (66)
  • Nginx (6)
  • Node.js (33)
  • OpenGL (6)
  • PriorityQueue (1)
  • ProgrammingLanguage (9)
  • Python (10)
  • RealAnalysis (20)
  • Recursion (3)
  • Redis (1)
  • RegularExpression (1)
  • Ruby (19)
  • SQLite (1)
  • Sentry (3)
  • Set (4)
  • Shell (3)
  • SoftwareEngineering (12)
  • Sorting (2)
  • Stack (4)
  • String (2)
  • SystemDesign (13)
  • Terraform (2)
  • Tree (24)
  • Trie (2)
  • TwoPointers (16)
  • TypeScript (3)
  • Ubuntu (4)
  • Home

    Locale System

    Published Jul 25, 2022 [  Linux  ]

    What are locales?

    A locale is a set of information that most programs use for determining country and language specific settings. The locales and their data are part of the system library and can be found at /usr/share/i18n/locales/ on most systems. A locale name is generally named ab_CD where ab is the two (or three) letter language code (as specified in ISO-639) and CD is the two letter country code (as specified in ISO-3166). Variants like @euro or @latin are often appended to locale names, e.g. de_DE@euro or nan_TW@latin.

    Environment variables for locales

    • LANG
      • Defines all locale settings at once, while allowing further individual customization via the LC_* settings below.
    • LC_COLLATE
      • Define alphabetical ordering of strings. This affects e.g. output of sorted directory listings.
    • LC_CTYPE
      • Define the character-handling properties for the system. This determines which characters are seen as alphabetic, numeric, and so on. This also determines the character set used, if applicable.
    • LC_MESSAGES
      • Programs’ localizations stored in /usr/share/locale/ for applications that use a message-based localization scheme (the majority of GNU programs).
    • LC_MONETARY
      • Defines currency units and formatting of currency-type numeric values.
    • LC_NUMERIC
      • Defines formatting of numeric values which aren’t monetary. Affects things such as thousand separator and decimal separator.
    • LC_TIME
      • Defines formatting of dates and times.
    • LC_PAPER
      • Defines default paper size.
    • LC_ALL
      • Overrides all other settings.

    Reference