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
|