[Overview][Index] Reference for unit 'clocale' (#rtl)

Reference for unit 'clocale'

Initialize internationalization settings from the C library

uses

  System;

  

The system unit

Overview

The clocale offers no API by itself: it just initializes the internationalization settings of the sysutils unit with the values provided by the C library found on most Unix or Linux systems that are POSIX compliant.

The clocale should simply be included in the uses clause of the program, preferably as one of the first units, and the initialization section of the unit will do all the work.

Note that including this unit, links your program to the C library of the system.

It makes no sense to use this unit on a non-POSIX system: Windows, OS/2 or DOS - therefore it should always be between an ifdef statement:

program myprogram;

uses 
  {$ifdef unix}clocale{$endif},
   classes, sysutils;

Documentation generated on: May 14 2021