blob: 9b61483cd1304fe819cded879147b6788a10d042 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
(define-module (hnh util language)
:export (resolve-language))
;; Locale objects, such as %global-locale, doesn't provide a way to access the language name,
;; This is for procedures which want to handle their translations manually.
(define (resolve-language)
"Returns a two character symbol representing the \"current\" language. e.g. en"
(string->symbol
(string-take
(or (getenv "LC_MESSAGES")
(getenv "LC_ALL")
"en")
2)))
|