Files
remind/include/lang/auto.rem
Dianne Skoll 4e7cfc20ce
All checks were successful
Remind unit tests / tests (push) Successful in 32s
Make use of SYSINCLUDE.
2024-12-13 08:28:14 -05:00

29 lines
793 B
Plaintext

# SPDX-License-Identifier: GPL-2.0-only
if !defined("__autolang__")
SET __autolang__ 1
PRESERVE __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
UNSET autolang
ENDIF