Function: org-export-translate

org-export-translate is a byte-compiled function defined in ox.el.gz.

Signature

(org-export-translate S ENCODING INFO)

Documentation

Translate string S according to language specification.

ENCODING is a symbol among :ascii, :html, :latex, :latin1 and :utf-8. INFO is a plist used as a communication channel.

Translation depends on :language property. Return the translated string. If no translation is found, try to fall back to :default encoding. If it fails, return S.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ox.el.gz
(defun org-export-translate (s encoding info)
  "Translate string S according to language specification.

ENCODING is a symbol among `:ascii', `:html', `:latex', `:latin1'
and `:utf-8'.  INFO is a plist used as a communication channel.

Translation depends on `:language' property.  Return the
translated string.  If no translation is found, try to fall back
to `:default' encoding.  If it fails, return S."
  (let* ((lang (plist-get info :language))
	 (translations (cdr (assoc lang
				   (cdr (assoc s org-export-dictionary))))))
    (or (plist-get translations encoding)
	(plist-get translations :default)
	s)))