The translate Reference Manual

This is the translate Reference Manual, version 0.1.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 07:54:45 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 translate

Abstraction layer for translations

Author

Daniel ’jackdaniel’ Kochmański <>

Home Page

https://gitlab.common-lisp.net/dkochmanski/translate

License

LLGPLv2

Version

0.1.1

Source

translate.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 translate/translate.asd

Source

translate.asd.

Parent Component

translate (system).

ASDF Systems

translate.


3.1.2 translate/package.lisp

Source

translate.asd.

Parent Component

translate (system).

Packages

translate.


3.1.3 translate/translate.lisp

Dependency

package.lisp (file).

Source

translate.asd.

Parent Component

translate (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 translate

Source

package.lisp.

Use List

common-lisp.

Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Special variables

Special Variable: *language*

Language for which the translation is done

Package

translate.

Source

translate.lisp.

Special Variable: *resolution-time*

Controlls translation resulution time - maybe be either :run-time or :load-time

Package

translate.

Source

translate.lisp.


5.1.2 Ordinary functions

Function: add-single-translation (language phrase translation)

Add TRANSLATION of PHRASE for given LANGUAGE

If LANGUAGE doesn’t exist, it is implicitly created and a warning is emmited.

Package

translate.

Source

translate.lisp.

Function: add-translations (language &rest translations)

Add any number of TRANSLATIONS for the given LANGUAGE

Package

translate.

Source

translate.lisp.

Function: define-language (name &rest translations)

Define language NAME with provided TRANSLATIONS

If LANGUAGE exists, a continuable error is signalled, which allows either dropping the operation or superseding the language which is already defined. TRANSLATIONS are alternating phrases and their corresponding objects.

Package

translate.

Source

translate.lisp.

Function: missing-translations ()

Creates a list of phrases which aren’t translated for the defined languages. Returns a list of form: ({(LANG ({PHRASE}*))}*)

Package

translate.

Source

translate.lisp.

Function: translate (phrase &optional language)

Find the translation of PHRASE in the store associated with LANGUAGE

If LANGUAGE is NIL, then this is the same as the the IDENTITY function. If the provided LANGUAGE isn’t defined, the store is explicitly created. If no PHRASE is defined for a given language, it is stored for later translation and replaced by PHRASE surrunded by curly brackets.

Package

translate.

Source

translate.lisp.


5.2 Internals


5.2.1 Special variables

Special Variable: *translations*

Table containing further translation tables

Package

translate.

Source

translate.lisp.


5.2.2 Macros

Macro: with-language (name (dict miss m-fn) &body body)

Conveniance macro which creates lexical invironment composed of macro symbols which resolve to language list.

Package

translate.

Source

translate.lisp.


5.2.3 Ordinary functions

Function: ensure-language (name &optional cerror-p)

If NAME isn’t NIL and language doesn’t exist - define it. If CERROR-P non-NIL, then signal a condition if it doesn’t exist, otherwise just emmit a warning.

Package

translate.

Source

translate.lisp.


Appendix A Indexes


A.1 Concepts