Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
cmucl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Carl Shapiro
cmucl
Commits
116da984
Commit
116da984
authored
14 years ago
by
rtoy
Browse files
Options
Downloads
Patches
Plain Diff
Update docs to match current implementation.
parent
90b30f0c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/cmu-user/extensions.tex
+25
-1
25 additions, 1 deletion
docs/cmu-user/extensions.tex
with
25 additions
and
1 deletion
docs/cmu-user/extensions.tex
+
25
−
1
View file @
116da984
...
...
@@ -2777,9 +2777,26 @@ All messages from \cmucl{} can be translated but as of this writing,
the only complete translation is a Pig Latin translation done by
machine. There are a few messages translated to Korean.
In general, translatable strings are marked as such by using the
functions
\code
{
intl:gettext
}
and
\code
{
intl:ngettext
}
or by using the
reader macros
\verb
+
_
+
or
\verb
+
_N
+
. When loading or compiling, such
strings are recorded for translation. At runtime, such strings are
looked in and the translation is returned. Doc strings do not need to
be noted in any way; the are automatically noted for translation.
By default, recording of translatable strings is disabled. To enable
recording of strings, call
\code
{
intl:translation-enable
}
.
\subsection
{
Dictionary
}
\label
{
sec:localization-dictionary
}
\begin{defun}
{
intl:
}{
translation-enable
}{}
Enable recording of translatable strings.
\end{defun}
\begin{defun}
{
intl:
}{
translation-disable
}{}
Disablle recording of translatable strings.
\end{defun}
\begin{defun}
{
intl:
}{
setlocale
}{
\ampoptional
{}
locale
}
Sets the locale to the locale specified by
\var
{
locale
}
. If
...
...
@@ -2846,6 +2863,12 @@ machine. There are a few messages translated to Korean.
This is a list of directory pathnames where the translations can be found.
\end{defvar}
\begin{defun}
{
intl:
}{
install
}{
\ampoptional
{}
(rt *readtable*)
}
Installs reader macros and comment reader into the specified
readtable as explained below. The readtable defaults to
\var
{
*readtable*
}
.
\end{defun}
Two reader macros are also provided:
\code
{
\_
''
}
and
\code
{
\_
N''
}
. The
first is equivalent to wrapping
\code
{
dgettext
}
around the string.
The second returns the string, but also records the string. This is
...
...
@@ -2864,7 +2887,8 @@ ends at the end of each line.
\subsection
{
Example Usage
}
\label
{
sec:localization-usage
}
Here is a simple example of how to localize your code.
Here is a simple example of how to localize your code. This assumes
that you've installed the reader macros via
\code
{
intl::install
}
.
\begin{example}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment