File: auto.rem

package info (click to toggle)
remind 06.02.03-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 40,888 kB
  • sloc: ansic: 25,719; sh: 6,377; perl: 3,076; lisp: 432; makefile: 263
file content (32 lines) | stat: -rw-r--r-- 730 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# SPDX-License-Identifier: GPL-2.0-only
if defined("__autolang__")
    RETURN
endif

SET __autolang__ 1
PRESERVE __autolang__

PUSH-VARS autolang
SET autolang getenv("REMIND_LANG")

IF autolang == ""
    SET autolang getenv("LC_ALL")
ENDIF
IF autolang == ""
    SET autolang getenv("LANGUAGE")
ENDIF
IF autolang == ""
    SET autolang getenv("LANG")
ENDIF

IF autolang != ""
    IF access($SysInclude + "/lang/" + lower(substr(autolang, 1, 5)) + ".rem", "r") == 0
        SYSINCLUDE lang/[lower(substr(autolang, 1, 5))].rem
    ELSE
        IF access($SysInclude + "/lang/" + lower(substr(autolang, 1, 2)) + ".rem", "r") == 0
            SYSINCLUDE lang/[lower(substr(autolang, 1, 2))].rem
        ENDIF
    ENDIF
ENDIF
POP-VARS