The cl-locale Reference Manual

This is the cl-locale Reference Manual, version 0.1.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 05:07:23 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 cl-locale

Simple i18n library for Common Lisp

Author

Eitarow Fukamachi

License

LLGPL

Long Description

# CL-Locale - Simple i18n library for Common Lisp
[![Build Status](https://travis-ci.org/fukamachi/cl-locale.svg?branch=master)](https://travis-ci.org/fukamachi/cl-locale)
[![Coverage Status](https://coveralls.io/repos/fukamachi/cl-locale/badge.svg?branch=master)](https://coveralls.io/r/fukamachi/cl-locale?branch=master)

## Usage

(cl-locale:enable-locale-syntax)

(define-dictionary schedule
(:ja-JP #p"i18n/ja_JP/message.lisp")
(:fr-FR #p"i18n/fr_FR/message.lisp"))

(define-dictionary lisp
(:ja-JP #p"i18n/ja_JP/message.lisp"))

(setf (current-dictionary) :schedule)

#i"Schedule"
;=> "Schedule"

(i18n "Schedule" :locale :ja-JP)
;=> "予定"

(let ((*locale* :fr-FR))
#i"Schedule")
;=> "Calendrier"

#i("Comments: ~A" 10)
;=> "コメント: 10個"

## What the difference

* cl-i18n: Does nit support loading multiple locales at the same time.
* cl-l10n: No reader macro predefined. No tools to automatically generate localizable files / language files.

## Dictionary Resource

; ja_JP/message.lisp
(("Schedule" . "予定")
("Lisping" . "舌足らず"))

; fr_FR/message.lisp
(("Schedule" . "Calendrier"))

## License

Copyright (c) 2011 Eitarow Fukamachi
Licensed under the LLGPL License.

Version

0.1.1

Dependencies
  • anaphora (system).
  • arnesi (system).
  • cl-annot (system).
  • cl-syntax (system).
  • cl-syntax-annot (system).
Source

cl-locale.asd.

Child Component

src (module).


3 Modules

Modules are listed depth-first from the system components tree.


3.1 cl-locale/src

Source

cl-locale.asd.

Parent Component

cl-locale (system).

Child Components

4 Files

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


4.1 Lisp


4.1.1 cl-locale/cl-locale.asd

Source

cl-locale.asd.

Parent Component

cl-locale (system).

ASDF Systems

cl-locale.

Packages

cl-locale-asd.


4.1.2 cl-locale/src/locale.lisp

Dependencies
Source

cl-locale.asd.

Parent Component

src (module).

Packages

cl-locale.


4.1.3 cl-locale/src/core.lisp

Source

cl-locale.asd.

Parent Component

src (module).

Packages

cl-locale.core.

Public Interface
Internals

4.1.4 cl-locale/src/reader.lisp

Dependency

core.lisp (file).

Source

cl-locale.asd.

Parent Component

src (module).

Packages

cl-locale.reader.

Public Interface
Internals

%enable-locale-syntax (function).


4.1.5 cl-locale/src/syntax.lisp

Dependency

reader.lisp (file).

Source

cl-locale.asd.

Parent Component

src (module).

Packages

cl-locale.syntax.

Public Interface

locale-syntax (special variable).


5 Packages

Packages are listed by definition order.


5.1 cl-locale-asd

Source

cl-locale.asd.

Use List
  • asdf/interface.
  • common-lisp.

5.2 cl-locale.core

Source

core.lisp.

Use List
  • anaphora.
  • cl-syntax.
  • common-lisp.
Used By List
Public Interface
Internals

5.3 cl-locale.syntax

Source

syntax.lisp.

Use List

common-lisp.

Used By List

cl-locale.

Public Interface

locale-syntax (special variable).


5.4 cl-locale.reader

Source

reader.lisp.

Use List
Used By List

cl-locale.

Public Interface
Internals

%enable-locale-syntax (function).


5.5 cl-locale

Source

locale.lisp.

Nickname

locale

Use List

6 Definitions

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


6.1 Public Interface


6.1.1 Special variables

Special Variable: *default-locale*
Package

cl-locale.core.

Source

core.lisp.

Special Variable: *dictionary-tables*
Package

cl-locale.core.

Source

core.lisp.

Special Variable: *locale*
Package

cl-locale.core.

Source

core.lisp.

Special Variable: locale-syntax
Package

cl-locale.syntax.

Source

syntax.lisp.


6.1.2 Macros

Macro: define-dictionary (name &body msg-clauses)
Package

cl-locale.core.

Source

core.lisp.

Macro: enable-locale-syntax ()
Package

cl-locale.reader.

Source

reader.lisp.


6.1.3 Ordinary functions

Function: current-dictionary ()
Package

cl-locale.core.

Source

core.lisp.

Function: (setf current-dictionary) ()
Package

cl-locale.core.

Source

core.lisp.

Function: i18n (string &key params locale dictionary)
Package

cl-locale.core.

Source

core.lisp.

Function: i18n-reader (stream char numarg)
Package

cl-locale.reader.

Source

reader.lisp.

Function: i18n-unformatted (string &key locale dictionary)
Package

cl-locale.core.

Source

core.lisp.

Function: i18n-unformatted-reader (stream char numarg)
Package

cl-locale.reader.

Source

reader.lisp.


6.1.4 Generic functions

Generic Function: register-dictionary (name dict &key locale)
Package

cl-locale.core.

Methods
Method: register-dictionary (name (dict pathname) &key locale)
Source

core.lisp.

Method: register-dictionary (name (dict cons) &key locale)

Example: (register-dictionary :schedule ’(("Schedule" . "予定")) :locale :ja-JP)

Source

core.lisp.


6.2 Internals


6.2.1 Special variables

Special Variable: *dictionary*
Package

cl-locale.core.

Source

core.lisp.


6.2.2 Ordinary functions

Function: %define-dictionary (name &rest msg-clauses)
Package

cl-locale.core.

Source

core.lisp.

Function: %enable-locale-syntax ()
Package

cl-locale.reader.

Source

reader.lisp.

Function: ensure-dictionary (name)
Package

cl-locale.core.

Source

core.lisp.

Function: ensure-hash-table (key hash)
Package

cl-locale.core.

Source

core.lisp.

Function: slurp-file (path)

Read a specified file and return the content as a sequence.

Package

cl-locale.core.

Source

core.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   %   (  
C   D   E   F   G   I   M   R   S  
Index Entry  Section

%
%define-dictionary: Private ordinary functions
%enable-locale-syntax: Private ordinary functions

(
(setf current-dictionary): Public ordinary functions

C
current-dictionary: Public ordinary functions

D
define-dictionary: Public macros

E
enable-locale-syntax: Public macros
ensure-dictionary: Private ordinary functions
ensure-hash-table: Private ordinary functions

F
Function, %define-dictionary: Private ordinary functions
Function, %enable-locale-syntax: Private ordinary functions
Function, (setf current-dictionary): Public ordinary functions
Function, current-dictionary: Public ordinary functions
Function, ensure-dictionary: Private ordinary functions
Function, ensure-hash-table: Private ordinary functions
Function, i18n: Public ordinary functions
Function, i18n-reader: Public ordinary functions
Function, i18n-unformatted: Public ordinary functions
Function, i18n-unformatted-reader: Public ordinary functions
Function, slurp-file: Private ordinary functions

G
Generic Function, register-dictionary: Public generic functions

I
i18n: Public ordinary functions
i18n-reader: Public ordinary functions
i18n-unformatted: Public ordinary functions
i18n-unformatted-reader: Public ordinary functions

M
Macro, define-dictionary: Public macros
Macro, enable-locale-syntax: Public macros
Method, register-dictionary: Public generic functions
Method, register-dictionary: Public generic functions

R
register-dictionary: Public generic functions
register-dictionary: Public generic functions
register-dictionary: Public generic functions

S
slurp-file: Private ordinary functions