Paste number 53575: Using cl-18n

Paste number 53575: Using cl-18n
Pasted by: Leslie P. Polzer
When:2 years, 6 months ago
Share:Tweet this! | http://paste.lisp.org/+15C7
Channel:None
Paste contents:
Raw Source | XML | Display As
CL-USER> (asdf:oos 'asdf:load-op 'cl-i18n)
T

CL-USER> (format t "The application encountered an error: ~A!~%" #!"Success")
WARNING: cl-i18n: translation table not initialized! Call “load-language” first.
WARNING: cl-i18n: no translation for "Success" defined!
The application encountered an error: Success!
NIL

CL-USER> (cl-i18n:load-language "klingon") ; load translations from ./klingon.lisp

; this file might look like this:
;
; (
;   "Greetings" -> "nuqneH"
;   "Success"   -> "Qapla’"
; )
;
; The -> can be an arbitrary unquoted symbol name.
; Whitespace including newlines doesn't matter except in strings.

inserted Greetings:nuqneH
inserted Success:Qapla’
#<HASH-TABLE :TEST EQUAL :COUNT 2 {A84F021}>

CL-USER> (format t "The application encountered an error: ~A!~%" #!"Success")
The application encountered an error: Qapla’!
NIL

This paste has no annotations.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.