Provided by: manpages-zh_1.5.2-1_all bug

NAME

       msgcat - Tcl

 SYNOPSIS
       package require Tcl 8.2

       package require msgcat 1.1

       ::msgcat::mc src-string

       ::msgcat::mclocale ?newLocale?

       ::msgcat::mcpreferences

       ::msgcat::mcload dirname

       ::msgcat::mcset locale src-string ?translate-string?

       ::msgcat::mcunknown locale src-string
_________________________________________________________________

 DESCRIPTION
       msgcat (locale)

 COMMANDS
       ::msgcat::mc src-string ?arg arg ...?
               src-string   (translation) src-string  format   src-string

                     src-string       ::msgcat::mc         ::msgcat::mcunknown
              ::msgcat::mcunknown

       ::msgcat::mc   ::msgcat::mc

       ::msgcat::mclocale ?newLocale?
                 newLocale   newLocale   newLocale   LOCALE   AND    SUBLOCALE
              SPECIFICATION

       ::msgcat::mcpreferences
              LANG=en_US_funky{en_US_funky en_US en}

       ::msgcat::mcload dirname
               ::msgcat::mcpreferences .msg

       ::msgcat::mcset locale src-string ?translate-string?
                locale   src-string   translate-string   translate-string src-
              string  translate-string

       ::msgcat::mcunknown locale src-string
                  src-string     ::msgcat::mc       src-string    ::msgcat::mc
              ::msgcat::mcunknown  ::msgcat::mcunknown   ::msgcat::mc

 LOCALE AND SUBLOCALE SPECIFICATION
       ()_ISO-639  ISO-3166 en English en_US  U.S.  English

        msgcat  env(LANG)  env(LANG)C

        en_UK_Funkyen_UK_Funkyen_UKen  ::msgcat::unknown

                ()  ID
              Arabic Saudi Arabiaar_SA
              Chinese (Simplified)Chinazh_CN
              Chinese (Traditional)Taiwanzh_TW
              English   United Statesen_US
              French Francefr_FR
              German Germanyde_DE
              Hebrew Israeliw_IL
              Italian   Italyit_IT
              Japanese  Japanja_JP
              Korean South Koreako_KR
              Spanish   Spaines_ES
              Swedish   Swedensv_SE

NAME

       (less prone to)

              mcset en hello "hello from ::"
              namespace eval foo {mcset en hello "hello from ::foo"}
              puts [mc hello]
              namespace eval foo {puts [mc hello]}

              hello from ::
              hello from ::foo

              mcset en m1 ":: message1"
              mcset en m2 ":: message2"
              mcset en m3 ":: message3"
              namespace eval ::foo {
                  mcset en m2 "::foo message2"
                  mcset en m3 "::foo message3"
              }
              namespace eval ::foo::bar {
                  mcset en m3 "::foo::bar message3"
              }
              puts "[mc m1]; [mc m2]; [mc m3]"
              namespace eval ::foo {puts "[mc m1]; [mc m2]; [mc m3]"}
              namespace eval ::foo::bar {puts "[mc m1]; [mc m2]; [mc m3]"}

              :: message1; :: message2; :: message3
              :: message1; ::foo message2; ::foo message3
              :: message1; ::foo message2; ::foo::bar message3

 LOCATION AND FORMAT OF MESSAGE FILES
       :

       [1]

       [2]    .msg:
              es.msg    -- spanish
              en_UK.msg -- UK English

       [3]     mcset :
              ::msgcat::mcset es "Free Beer!" "Cerveza Gracias!"

 RECOMMENDED MESSAGE SETUP FOR PACKAGES
       tcl_pkgPath   package require

       [1]    msgs

       [2]     *.msg

       [3]    :
              # load language files, stored in msgs subdirectory
              ::msgcat::mcload [file join [file dirname [info script]] msgs]

 FORMAT  SCAN  POSTITIONAL CODES FOR FORMAT AND SCAN COMMANDS
        format  XPG3
              format "We produced %d units in location %s" $num $city
              format "In location %s we produced %d units" $city $num

       :
              format "We produced %1\$d units in location %2\$s" $num $city
              format "In location %2\$s we produced %1\$d units" $num $city

        scan

 CREDITS
        Mark Harrison

 SEE ALSO
       format(n), scan(n), namespace(n), package(n)

 KEYWORDS
       internationalization,   i18n,   localization,   l10n,   message,  text,
       translation

[]


[]

       2001/10/12

 Linux  man :
       http://cmpp.linuxforum.net