Function: get-lang-string
get-lang-string is a byte-compiled function defined in tutorial.el.gz.
Signature
(get-lang-string LANG STRINGID &optional NO-ENG-FALLBACK)
Documentation
Get a language specific string for Emacs.
In certain places Emacs can replace a string shown to the user with a language specific string. This function retrieves such strings.
LANG is the language specification. It should be one of those
strings that can be returned by read-language-name. STRINGID
is a symbol that specifies the string to retrieve.
If no string is found for STRINGID in the chosen language then the English string is returned unless NO-ENG-FALLBACK is non-nil.
See lang-strings for more information.
Currently this feature is only used in help-with-tutorial.
Source Code
;; Defined in /usr/src/emacs/lisp/tutorial.el.gz
(defun get-lang-string (lang stringid &optional no-eng-fallback)
"Get a language specific string for Emacs.
In certain places Emacs can replace a string shown to the user with
a language specific string. This function retrieves such strings.
LANG is the language specification. It should be one of those
strings that can be returned by `read-language-name'. STRINGID
is a symbol that specifies the string to retrieve.
If no string is found for STRINGID in the chosen language then
the English string is returned unless NO-ENG-FALLBACK is non-nil.
See `lang-strings' for more information.
Currently this feature is only used in `help-with-tutorial'."
(let ((my-lang-strings (assoc lang lang-strings))
(found-string))
(when my-lang-strings
(let ((entry (assoc stringid (cdr my-lang-strings))))
(when entry
(setq found-string (cdr entry)))))
;; Fallback to English strings
(unless (or found-string
no-eng-fallback)
(setq found-string (get-lang-string "English" stringid t)))
found-string))