What does your feature request improve on? Please describe.
Writing generic packages require now that we either create that in English only or let the user decide upon the used language (which requires additional overhead). Having a function to access the user's installed language, would make this a bit easier.
Describe the solution you'd like
Create a function getuilang() -> STR, which shall return the language codes like de-DE or en-GB of the current used and installed language.
Additional context
Add any other context or screenshots about the feature request here.
(Do not write below this line)
DEVS' SECTION
ANALYSIS
[x] Create a new language string in main.nlng, e.g. LANGUAGE=en-GB or LANGUAGE=de-DE
[x] Create a string function getuilang() as static StringVector strfnc_getuilang(StringFuncArgs& funcArgs), register that in static std::map<std::string, StringFuncHandle> getStringFuncHandles() (both in kernel/core/strings/stringfunctions.hpp) as StringFuncHandle(NOARGS, strfnc_getuilang, false)
[x] Search for "getversioninfo" in the code base and add "getuilang" to these locations
[x] Add getuilang to common/syntaxelements.nlang
[x] Add getuilang to the language files */numere.nlang as well as the search data base */find.ndb
DESCRIPTION
What does your feature request improve on? Please describe. Writing generic packages require now that we either create that in English only or let the user decide upon the used language (which requires additional overhead). Having a function to access the user's installed language, would make this a bit easier.
Describe the solution you'd like Create a function
getuilang() -> STR
, which shall return the language codes likede-DE
oren-GB
of the current used and installed language.Additional context Add any other context or screenshots about the feature request here.
(Do not write below this line)
DEVS' SECTION
ANALYSIS
main.nlng
, e.g.LANGUAGE=en-GB
orLANGUAGE=de-DE
getuilang()
asstatic StringVector strfnc_getuilang(StringFuncArgs& funcArgs)
, register that instatic std::map<std::string, StringFuncHandle> getStringFuncHandles()
(both inkernel/core/strings/stringfunctions.hpp
) asStringFuncHandle(NOARGS, strfnc_getuilang, false)
"getversioninfo"
in the code base and add"getuilang"
to these locationsgetuilang
tocommon/syntaxelements.nlang
getuilang
to the language files*/numere.nlang
as well as the search data base*/find.ndb
IMPLEMENTATION STEPS
(see also our Wiki for implementation guidelines)
DOCUMENTATION STEPS
(see also our Wiki for further information)
*.NHLP
and*.NDB
files, if needed)*.NLNG
files, if needed)PULL REQUEST