Module Locale


module Locale: sig  end
Locale manipulation.


type category =
| LC_ALL
| LC_COLLATE
| LC_CTYPE
| LC_MESSAGES
| LC_MONETARY
| LC_NUMERIC
| LC_TIME
The types of locales


type numeric_lconv = {
   decimal_point : string;
   thousands_sep : string;
   grouping : string;
}
Information pertaining to the LC_NUMERIC locale.


type sign_pos =
| SurroundBoth
| SignPrecedesBoth
| SignSucceedsBoth
| SignPrecedsCS
| SignSucceedsCS
| UnknownOrder


type monetary_lconv = {
   int_curr_symbol : string;
   currency_symbol : string;
   decimal_point : string;
   thousands_sep : string;
   grouping : string;
   positive_sign : string;
   negative_sign : string;
   int_frac_digits : int;
   frac_digits : int;
   p_cs_precedes : bool;
   p_sep_by_space : bool;
   n_cs_precedes : bool;
   n_sep_by_space : bool;
   p_sign_posn : sign_pos;
   n_sign_posn : sign_pos;
}
Information pertaining to the LC_MONETARY locale.

val set : ?name:string -> category -> string option
If a new locale name is not provided, just return the Some name of the current locale for the category. An empty name sets the locale based on environment variables. Returns None when setting the locale fails.
val set_from_env : category -> string option
Set the locale based on environment variables
val get : category -> string
Get the current locale for a category
val numeric_info : unit -> numeric_lconv
Return the settings for the current LC_NUMERIC locale.
val monetary_info : unit -> monetary_lconv
Return the settings for the current LC_MONETARY locale.