diff options
Diffstat (limited to 'doc/msgcat.n')
| -rw-r--r-- | doc/msgcat.n | 58 |
1 files changed, 21 insertions, 37 deletions
diff --git a/doc/msgcat.n b/doc/msgcat.n index 3d433d8..94884f3 100644 --- a/doc/msgcat.n +++ b/doc/msgcat.n @@ -17,33 +17,27 @@ msgcat \- Tcl message catalog \fB::msgcat::mc \fIsrc-string\fR ?\fIarg arg ...\fR? \fB::msgcat::mcmax ?\fIsrc-string src-string ...\fR? -.VS "TIP 412" \fB::msgcat::mcexists\fR ?\fB\-exactnamespace\fR? ?\fB\-exactlocale\fR? \fIsrc-string\fR -.VE "TIP 412" -.VS "TIP 490" +.VS TIP490 \fB::msgcat::mcpackagenamespaceget\fR -.VE "TIP 490" +.VE TIP490 \fB::msgcat::mclocale \fR?\fInewLocale\fR? -.VS "TIP 499" +.VS TIP499 \fB::msgcat::mcpreferences\fR ?\fIlocale preference\fR? ... -.VE "TIP 499" -.VS "TIP 412" +.VE TIP499 \fB::msgcat::mcloadedlocales subcommand\fR -.VE "TIP 412" \fB::msgcat::mcload \fIdirname\fR \fB::msgcat::mcset \fIlocale src-string \fR?\fItranslate-string\fR? \fB::msgcat::mcmset \fIlocale src-trans-list\fR \fB::msgcat::mcflset \fIsrc-string \fR?\fItranslate-string\fR? \fB::msgcat::mcflmset \fIsrc-trans-list\fR \fB::msgcat::mcunknown \fIlocale src-string\fR ?\fIarg arg ...\fR? -.VS "TIP 412" \fB::msgcat::mcpackagelocale subcommand\fR ?\fIlocale\fR? \fB::msgcat::mcpackageconfig subcommand\fI option\fR ?\fIvalue\fR? \fB::msgcat::mcforgetpackage\fR -.VE "TIP 412" -.VS "TIP 499" +.VS TIP499 \fB::msgcat::mcutil subcommand\fR ?\fIlocale\fR? -.VS "TIP 499" +.VS TIP499 .fi .BE .SH DESCRIPTION @@ -69,9 +63,9 @@ decide to use the global locale or to use a package specific locale. The global locale may be changed on demand, for example by a user initiated language change or within a multi user application like a web server. .PP -.VS tip490 +.VS TIP490 Object oriented programming is supported by the use of a package namespace. -.VE tip490 +.VE TIP490 .PP .SH COMMANDS .\" COMMAND: mc @@ -101,7 +95,7 @@ later simply by defining new message catalog entries. .\" COMMAND: mcn .TP \fB::msgcat::mcn \fInamespace src-string\fR ?\fIarg arg ...\fR? -.VS "TIP 490" +.VS TIP490 Like \fB::msgcat::mc\fR, but with the message namespace specified as first argument. .PP @@ -122,7 +116,6 @@ fixed width (which will be the width of the widest button). .\" COMMAND: mcexists .TP \fB::msgcat::mcexists\fR ?\fB\-exactnamespace\fR? ?\fB\-exactlocale\fR? ?\fB\-namespace\fI namespace\fR? \fIsrc-string\fR -.VS "TIP 412" Return true, if there is a translation for the given \fIsrc-string\fR. .PP .RS @@ -133,17 +126,16 @@ It may also be limited by the option \fB\-exactlocale\fR to only check the first prefered locale (e.g. first element returned by \fB::msgcat::mcpreferences\fR if global locale is used). .PP -.VE "TIP 412" -.VS "TIP 490" +.VS TIP490 An explicit package namespace may be specified by the option \fB\-namespace\fR. The namespace of the caller is used if not explicitly specified. .RE .PP -.VE "TIP 490" +.VE TIP490 .\" COMMAND: mcpackagenamespaceget .TP \fB::msgcat::mcpackagenamespaceget\fR -.VS "TIP 490" +.VS TIP490 Return the package namespace of the caller. This command handles all cases described in section \fBOBJECT ORIENTED PROGRAMMING\fR. .PP @@ -166,7 +158,7 @@ proc ::tooltip::show {widget messagenamespace message} { .CE .RE .PP -.VE "TIP 490" +.VE TIP490 .\" COMMAND: mclocale .TP \fB::msgcat::mclocale \fR?\fInewLocale\fR? @@ -192,10 +184,8 @@ The initial locale is determined by the locale specified in the user's environment. See \fBLOCALE SPECIFICATION\fR below for a description of the locale string format. .PP -.VS "TIP 412" If the locale is set, the preference list of locales is evaluated. Locales in this list are loaded now, if not jet loaded. -.VE "TIP 412" .RE .\" COMMAND: mcpreferences .TP @@ -205,7 +195,7 @@ Without arguments, returns an ordered list of the locales preferred by the user. The list is ordered from most specific to least preference. .PP -.VS "TIP 499" +.VS TIP499 .RS A set of locale preferences may be given to set the list of locale preferences. The current locale is also set, which is the first element of the locale @@ -223,7 +213,7 @@ configured by: .\" COMMAND: mcloadedlocales .TP \fB::msgcat::mcloadedlocales subcommand\fR -.VS "TIP 499" +.VS TIP499 This group of commands manage the list of loaded locales for packages not setting a package locale. .PP @@ -237,7 +227,6 @@ the current preference list. .\" COMMAND: mcload .TP \fB::msgcat::mcload \fIdirname\fR -.VS "TIP 412" Searches the specified directory for files that match the language specifications returned by \fB::msgcat::mcloadedlocales loaded\fR (or \fBmsgcat::mcpackagelocale preferences\fR if a package locale is set) @@ -255,7 +244,6 @@ and were loaded is returned. In addition, the given folder is stored in the \fBmsgcat\fR package configuration option \fImcfolder\fR to eventually load message catalog files required by a locale change. -.VE "TIP 412" .RE .\" COMMAND: mcset .TP @@ -311,7 +299,6 @@ string. The \fB::msgcat::mcunknown\fR procedure is invoked at the same stack context as the call to \fB::msgcat::mc\fR. The return value of \fB::msgcat::mcunknown\fR is used as the return value for the call to \fB::msgcat::mc\fR. -.VS "TIP 412" .RS .PP Note that this routine is only called if the concerned package did not set a @@ -323,11 +310,10 @@ package locale unknown command name. . The calling package clears all its state within the \fBmsgcat\fR package including all settings and translations. -.VE "TIP 412" .PP .\" COMMAND: mcutil .\" METHOD: getpreferences -.VS "TIP 499" +.VS TIP499 .TP \fB::msgcat::mcutil getpreferences\fI locale\fR . @@ -345,7 +331,7 @@ fr_ch fr de_ch de {} . The system locale is returned as described by the section \fBLOCALE SPECIFICATION\fR. -.VE "TIP 499" +.VE TIP499 .PP .SH "LOCALE SPECIFICATION" .PP @@ -550,7 +536,6 @@ formatting substitution is done directly. # ... where that key is mapped to one of the # human-oriented versions by \fBmsgcat::mcset\fR .CE -.VS "TIP 412" .SH "PACKAGE PRIVATE LOCALE" .PP A package using \fBmsgcat\fR may choose to use its own package private @@ -592,13 +577,13 @@ The package locale state (set or not) is not changed (in contrast to the command \fB::msgcat::mcpackagelocale set\fR). .PP .RS -.VS "TIP 499" +.VS TIP499 If a set of locale preferences is given, it is set as package locale preference list. The package locale is set to the first element of the preference list. A package locale is activated, if it was not set so far. .PP Locale preferences are loaded now for the package, if not yet loaded. -.VE "TIP 499" +.VE TIP499 .RE .PP .\" METHOD: loaded @@ -741,7 +726,7 @@ interpreter is invoked after command completion. Only exception is the callback \fBunknowncmd\fR, where an error causes the invoking \fBmc\fR-command to fail with that error. .PP -.VS tip490 +.VS TIP490 .SH "OBJECT ORIENTED PROGRAMMING" \fBmsgcat\fR supports packages implemented by object oriented programming. Objects and classes should be defined within a package namespace. @@ -791,7 +776,7 @@ namespace eval ::N4 { } .CE .PP -.VE tip490 +.VE TIP490 .SH EXAMPLES Packages which display a GUI may update their widgets when the global locale changes. To register to a callback, use: @@ -858,7 +843,6 @@ proc ::tcl::clock::LocalizeFormat { locale format } { return $format } .CE -.VE "TIP 412" .SH CREDITS .PP The message catalog code was developed by Mark Harrison. |
