Hi,<br><br>I am using the attached localization mechanisms in my projects. Maybe it could be included in cl-l10n if others say it's good enough.<br><br>The intentions are the following:<br> - allow to define locale specific functions
<br> - do not require to write the current locale at the call site<br> - allow to define individual versions for different languages at different places<br> - implicitly dispatch on locale<br> - allow to pass parameters and return arbitrary types
<br> - fast access for constant strings<br><br>Any suggestions are welcomed!<br><br>usage:<br>(en-GB (one "one")<br> (person-name (first-name last-name)<br> (strcat first-name " " last-name)))
<br clear="all"><br>(hu-HU (one "egy")<br> (person-name (first-name last-name)<br> (strcat last-name " " first-name)))<br><br>(with-locale 'en-GB (one))<br>(with-locale 'hu-HU (person-name "Levente" "Mészáros"))
<br>
<br>The following changes are also necessary: (cl-l10n.asd, package.lisp)<br><br>diff -r cl-l10n/cl-l10n.asd cl-l10ncvs/cl-l10n/cl-l10n.asd<br>26,28c26,27<br>< (:file "i18n" :depends-on ("printers"))
<br>< (:file "localize" :depends-on ("locale")))<br>< :depends-on (:cl-ppcre :cl-fad :split-sequence))<br>---<br>> (:file "i18n" :depends-on ("printers")))
<br>> :depends-on (:cl-ppcre :cl-fad))<br>32a32<br>><br>diff -r cl-l10n/package.lisp cl-l10ncvs/cl-l10n/package.lisp<br>6c6<br>< (:use #:cl #:cl-ppcre #:cl-fad #:split-sequence)<br>---<br>> (:use #:cl #:cl-ppcre #:cl-fad)
<br>10c10<br>< #:get-locale #:*locale* #:*locale-path* #:*locales*<br>---<br>> #:*locale* #:*locale-path* #:*locales*<br>16,19c16,17<br>< #:secondp #:am-pm #:zone #:parser-error<br>
< #:with-locale #:locale-for #:define-all-locales #:lookup-resource<br>< #:lookup-resource-with-fallback #:*fallback-locales* #:localize<br>< #:missing-resource))<br>---<br>> #:secondp #:am-pm #:zone #:parser-error))
<br>><br><br>-- <br>There's no perfectoin