The cl-locale Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The cl-locale Reference Manual

This is the cl-locale Reference Manual, version 0.1.1, generated automatically by Declt version 2.3 "Robert April" on Tue Jan 09 13:48:12 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

CL-Locale - Simple i18n library for Common Lisp

Build Status Coverage Status

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

Dictionary Resource

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

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

License

Copyright (c) 2011 Eitarow Fukamachi
Licensed


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

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


Previous: , Up: Systems   [Contents][Index]

2.1 cl-locale

Author

Eitarow Fukamachi

License

LLGPL

Description

Simple i18n library for Common Lisp

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
Source

cl-locale.asd (file)

Component

src (module)


Next: , Previous: , Up: Top   [Contents][Index]

3 Modules

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


Previous: , Up: Modules   [Contents][Index]

3.1 cl-locale/src

Parent

cl-locale (system)

Location

src/

Components

Next: , Previous: , Up: Top   [Contents][Index]

4 Files

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


Previous: , Up: Files   [Contents][Index]

4.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.1 cl-locale.asd

Location

cl-locale.asd

Systems

cl-locale (system)

Packages

cl-locale-asd


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.2 cl-locale/src/locale.lisp

Dependencies
Parent

src (module)

Location

src/locale.lisp

Packages

cl-locale


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.3 cl-locale/src/core.lisp

Parent

src (module)

Location

src/core.lisp

Packages

cl-locale.core

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.4 cl-locale/src/reader.lisp

Dependency

core.lisp (file)

Parent

src (module)

Location

src/reader.lisp

Packages

cl-locale.reader

Exported Definitions
Internal Definitions

%enable-locale-syntax (function)


Previous: , Up: Lisp files   [Contents][Index]

4.1.5 cl-locale/src/syntax.lisp

Dependency

reader.lisp (file)

Parent

src (module)

Location

src/syntax.lisp

Packages

cl-locale.syntax

Exported Definitions

locale-syntax (special variable)


Next: , Previous: , Up: Top   [Contents][Index]

5 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

5.1 cl-locale-asd

Source

cl-locale.asd

Use List

Next: , Previous: , Up: Packages   [Contents][Index]

5.2 cl-locale

Source

locale.lisp (file)

Nickname

locale

Use List

Next: , Previous: , Up: Packages   [Contents][Index]

5.3 cl-locale.core

Source

core.lisp (file)

Use List
Used By List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Packages   [Contents][Index]

5.4 cl-locale.reader

Source

reader.lisp (file)

Use List
Used By List

cl-locale

Exported Definitions
Internal Definitions

%enable-locale-syntax (function)


Previous: , Up: Packages   [Contents][Index]

5.5 cl-locale.syntax

Source

syntax.lisp (file)

Use List

common-lisp

Used By List

cl-locale

Exported Definitions

locale-syntax (special variable)


Next: , Previous: , Up: Top   [Contents][Index]

6 Definitions

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


Next: , Previous: , Up: Definitions   [Contents][Index]

6.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.1 Special variables

Special Variable: *default-locale*
Package

cl-locale.core

Source

core.lisp (file)

Special Variable: *dictionary-tables*
Package

cl-locale.core

Source

core.lisp (file)

Special Variable: *locale*
Package

cl-locale.core

Source

core.lisp (file)

Special Variable: locale-syntax
Package

cl-locale.syntax

Source

syntax.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.2 Macros

Macro: define-dictionary NAME &body MSG-CLAUSES
Package

cl-locale.core

Source

core.lisp (file)

Macro: enable-locale-syntax ()
Package

cl-locale.reader

Source

reader.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.3 Functions

Function: current-dictionary ()
Function: (setf current-dictionary) NAME
Package

cl-locale.core

Source

core.lisp (file)

Function: i18n STRING &key PARAMS LOCALE DICTIONARY
Package

cl-locale.core

Source

core.lisp (file)

Function: i18n-reader STREAM CHAR NUMARG
Package

cl-locale.reader

Source

reader.lisp (file)

Function: i18n-unformatted STRING &key LOCALE DICTIONARY
Package

cl-locale.core

Source

core.lisp (file)

Function: i18n-unformatted-reader STREAM CHAR NUMARG
Package

cl-locale.reader

Source

reader.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

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 (file)

Method: register-dictionary NAME (DICT cons) &key LOCALE

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

Source

core.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

6.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.1 Special variables

Special Variable: *dictionary*
Package

cl-locale.core

Source

core.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

6.2.2 Functions

Function: %define-dictionary NAME &rest MSG-CLAUSES
Package

cl-locale.core

Source

core.lisp (file)

Function: %enable-locale-syntax ()
Package

cl-locale.reader

Source

reader.lisp (file)

Function: ensure-dictionary NAME
Package

cl-locale.core

Source

core.lisp (file)

Function: ensure-hash-table KEY HASH
Package

cl-locale.core

Source

core.lisp (file)

Function: slurp-file PATH

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

Package

cl-locale.core

Source

core.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   C   F   L   M  
Index Entry  Section

C
cl-locale.asd: The cl-locale<dot>asd file
cl-locale/src: The cl-locale/src module
cl-locale/src/core.lisp: The cl-locale/src/core<dot>lisp file
cl-locale/src/locale.lisp: The cl-locale/src/locale<dot>lisp file
cl-locale/src/reader.lisp: The cl-locale/src/reader<dot>lisp file
cl-locale/src/syntax.lisp: The cl-locale/src/syntax<dot>lisp file

F
File, Lisp, cl-locale.asd: The cl-locale<dot>asd file
File, Lisp, cl-locale/src/core.lisp: The cl-locale/src/core<dot>lisp file
File, Lisp, cl-locale/src/locale.lisp: The cl-locale/src/locale<dot>lisp file
File, Lisp, cl-locale/src/reader.lisp: The cl-locale/src/reader<dot>lisp file
File, Lisp, cl-locale/src/syntax.lisp: The cl-locale/src/syntax<dot>lisp file

L
Lisp File, cl-locale.asd: The cl-locale<dot>asd file
Lisp File, cl-locale/src/core.lisp: The cl-locale/src/core<dot>lisp file
Lisp File, cl-locale/src/locale.lisp: The cl-locale/src/locale<dot>lisp file
Lisp File, cl-locale/src/reader.lisp: The cl-locale/src/reader<dot>lisp file
Lisp File, cl-locale/src/syntax.lisp: The cl-locale/src/syntax<dot>lisp file

M
Module, cl-locale/src: The cl-locale/src module

Jump to:   C   F   L   M  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

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

%
%define-dictionary: Internal functions
%enable-locale-syntax: Internal functions

(
(setf current-dictionary): Exported functions

C
current-dictionary: Exported functions

D
define-dictionary: Exported macros

E
enable-locale-syntax: Exported macros
ensure-dictionary: Internal functions
ensure-hash-table: Internal functions

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

G
Generic Function, register-dictionary: Exported generic functions

I
i18n: Exported functions
i18n-reader: Exported functions
i18n-unformatted: Exported functions
i18n-unformatted-reader: Exported functions

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

R
register-dictionary: Exported generic functions
register-dictionary: Exported generic functions
register-dictionary: Exported generic functions

S
slurp-file: Internal functions

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

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
L   S  
Index Entry  Section

*
*default-locale*: Exported special variables
*dictionary*: Internal special variables
*dictionary-tables*: Exported special variables
*locale*: Exported special variables

L
locale-syntax: Exported special variables

S
Special Variable, *default-locale*: Exported special variables
Special Variable, *dictionary*: Internal special variables
Special Variable, *dictionary-tables*: Exported special variables
Special Variable, *locale*: Exported special variables
Special Variable, locale-syntax: Exported special variables

Jump to:   *  
L   S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   P   S  
Index Entry  Section

C
cl-locale: The cl-locale system
cl-locale: The cl-locale package
cl-locale-asd: The cl-locale-asd package
cl-locale.core: The cl-locale<dot>core package
cl-locale.reader: The cl-locale<dot>reader package
cl-locale.syntax: The cl-locale<dot>syntax package

P
Package, cl-locale: The cl-locale package
Package, cl-locale-asd: The cl-locale-asd package
Package, cl-locale.core: The cl-locale<dot>core package
Package, cl-locale.reader: The cl-locale<dot>reader package
Package, cl-locale.syntax: The cl-locale<dot>syntax package

S
System, cl-locale: The cl-locale system

Jump to:   C   P   S