From d86d28054a73a8584b708401c205b7c702e1e81a Mon Sep 17 00:00:00 2001 From: José Carlos Nieto Date: Sat, 20 Feb 2016 07:59:30 -0600 Subject: Adding old LC_* style constants for backward compatibility. --- gettext.go | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/gettext.go b/gettext.go index cfd146b..44c067b 100644 --- a/gettext.go +++ b/gettext.go @@ -42,9 +42,9 @@ var ( // LcAll is for all of the locale. LcAll = uint(C.LC_ALL) - // LcColate is for regular expression matching (it determines the meaning of + // LcCollate is for regular expression matching (it determines the meaning of // range expressions and equivalence classes) and string collation. - LcColate = uint(C.LC_ALL) + LcCollate = uint(C.LC_COLLATE) // LcCtype is for regular expression matching, character classification, // conversion, case-sensitive comparison, and wide character functions. @@ -64,6 +64,17 @@ var ( LcTime = uint(C.LC_TIME) ) +// Deprecated but kept for backwards compatibility. +var ( + LC_ALL = LcAll + LC_COLLATE = LcCollate + LC_CTYPE = LcCtype + LC_MESSAGES = LcMessages + LC_MONETARY = LcMonetary + LC_NUMERIC = LcNumeric + LC_TIME = LcTime +) + // SetLocale sets the program's current locale. func SetLocale(category uint, locale string) string { clocale := C.CString(locale) -- cgit v1.2.3