summaryrefslogtreecommitdiffstats
path: root/Godeps/_workspace/src/github.com/cloudfoundry/jibber_jabber/README.md
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2016-01-19 10:54:19 -0600
committer=Corey Hulen <corey@hulen.com>2016-01-19 10:54:19 -0600
commit4389571dedb9a68d801427c37ad971c8c488991f (patch)
treed66189c2ba3c76b76488a3d0dd6ae210ddfc0096 /Godeps/_workspace/src/github.com/cloudfoundry/jibber_jabber/README.md
parent80bfdf71f2ab7271dd199c61229fa2b8a7e0213c (diff)
downloadchat-4389571dedb9a68d801427c37ad971c8c488991f.tar.gz
chat-4389571dedb9a68d801427c37ad971c8c488991f.tar.bz2
chat-4389571dedb9a68d801427c37ad971c8c488991f.zip
PLT-7 adding server side libraries
Diffstat (limited to 'Godeps/_workspace/src/github.com/cloudfoundry/jibber_jabber/README.md')
-rw-r--r--Godeps/_workspace/src/github.com/cloudfoundry/jibber_jabber/README.md44
1 files changed, 44 insertions, 0 deletions
diff --git a/Godeps/_workspace/src/github.com/cloudfoundry/jibber_jabber/README.md b/Godeps/_workspace/src/github.com/cloudfoundry/jibber_jabber/README.md
new file mode 100644
index 000000000..d696eb6b6
--- /dev/null
+++ b/Godeps/_workspace/src/github.com/cloudfoundry/jibber_jabber/README.md
@@ -0,0 +1,44 @@
+# Jibber Jabber [![Build Status](https://travis-ci.org/cloudfoundry/jibber_jabber.svg?branch=master)](https://travis-ci.org/cloudfoundry/jibber_jabber)
+Jibber Jabber is a GoLang Library that can be used to detect an operating system's current language.
+
+### OS Support
+
+OSX and Linux via the `LC_ALL` and `LANG` environment variables. These are standard variables that are used in ALL versions of UNIX for language detection.
+
+Windows via [GetUserDefaultLocaleName](http://msdn.microsoft.com/en-us/library/windows/desktop/dd318136.aspx) and [GetSystemDefaultLocaleName](http://msdn.microsoft.com/en-us/library/windows/desktop/dd318122.aspx) system calls. These calls are supported in Windows Vista and up.
+
+# Usage
+Add the following line to your go `import`:
+
+```
+ "github.com/cloudfoundry/jibber_jabber"
+```
+
+### DetectIETF
+`DetectIETF` will return the current locale as a string. The format of the locale will be the [ISO 639](http://en.wikipedia.org/wiki/ISO_639) two-letter language code, a DASH, then an [ISO 3166](http://en.wikipedia.org/wiki/ISO_3166-1) two-letter country code.
+
+```
+ userLocale, err := jibber_jabber.DetectIETF()
+ println("Locale:", userLocale)
+```
+
+### DetectLanguage
+`DetectLanguage` will return the current languge as a string. The format will be the [ISO 639](http://en.wikipedia.org/wiki/ISO_639) two-letter language code.
+
+```
+ userLanguage, err := jibber_jabber.DetectLanguage()
+ println("Language:", userLanguage)
+```
+
+### DetectTerritory
+`DetectTerritory` will return the current locale territory as a string. The format will be the [ISO 3166](http://en.wikipedia.org/wiki/ISO_3166-1) two-letter country code.
+
+```
+ localeTerritory, err := jibber_jabber.DetectTerritory()
+ println("Territory:", localeTerritory)
+```
+
+### Errors
+All the Detect commands will return an error if they are unable to read the Locale from the system.
+
+For Windows, additional error information is provided due to the nature of the system call being used.