aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Carlos Nieto <jose.carlos@menteslibres.net>2016-02-20 07:59:30 -0600
committerJosé Carlos Nieto <jose.carlos@menteslibres.net>2016-02-20 07:59:30 -0600
commitd86d28054a73a8584b708401c205b7c702e1e81a (patch)
tree395686270eb6e857cef917efe94940ab31924eb8
parentMerge branch 'master' of github.com:gosexy/gettext (diff)
downloadgotext-d86d28054a73a8584b708401c205b7c702e1e81a.tar.gz
gotext-d86d28054a73a8584b708401c205b7c702e1e81a.tar.xz
Adding old LC_* style constants for backward compatibility.
-rw-r--r--gettext.go15
1 files 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)