Set_Loca.sgm 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <!-- $XConsortium: Set_Loca.sgm /main/6 1996/09/08 20:15:52 rws $ -->
  2. <!-- (c) Copyright 1995 Digital Equipment Corporation. -->
  3. <!-- (c) Copyright 1995 Hewlett-Packard Company. -->
  4. <!-- (c) Copyright 1995 International Business Machines Corp. -->
  5. <!-- (c) Copyright 1995 Sun Microsystems, Inc. -->
  6. <!-- (c) Copyright 1995 Novell, Inc. -->
  7. <!-- (c) Copyright 1995 FUJITSU LIMITED. -->
  8. <!-- (c) Copyright 1995 Hitachi. -->
  9. <![ %CDE.C.CDE; [<RefEntry Id="CDEMX.XCDI.MAN310.rsml.1">]]>
  10. <![ %CDE.C.XO; [<RefEntry Id="XCDI.MAN310.rsml.1">]]>
  11. <RefMeta>
  12. <RefEntryTitle>Set_Locale</RefEntryTitle>
  13. <ManVolNum>special file</ManVolNum>
  14. </RefMeta>
  15. <RefNameDiv>
  16. <RefName><Symbol Role="Message">Set_Locale</Symbol></RefName>
  17. <RefPurpose>set a tool's locale
  18. </RefPurpose>
  19. </RefNameDiv>
  20. <!-- $XConsortium: Set_Loca.sgm /main/6 1996/09/08 20:15:52 rws $-->
  21. <!-- CDE Common Source Format, Version 1.0.0-->
  22. <!-- (c) Copyright 1993, 1994, 1995 Hewlett-Packard Company-->
  23. <!-- (c) Copyright 1993, 1994, 1995 International Business Machines Corp.-->
  24. <!-- (c) Copyright 1993, 1994, 1995 Sun Microsystems, Inc.-->
  25. <!-- (c) Copyright 1993, 1994, 1995 Novell, Inc.-->
  26. <RefSynopsisDiv>
  27. <Synopsis>Set_Locale(in string <Emphasis>category</Emphasis>,
  28. in string <Symbol Role="Variable">locale</Symbol>
  29. [...]);
  30. </Synopsis>
  31. </RefSynopsisDiv>
  32. <RefSect1>
  33. <Title>DESCRIPTION</Title>
  34. <Para>The
  35. <Symbol Role="Message">Set_Locale</Symbol> request
  36. reports the
  37. <![ %CDE.C.XO; [XPG4
  38. ]]><![ %CDE.C.CDE; [POSIX
  39. ]]>locale of the indicated locale categories.
  40. </Para>
  41. <Para>The
  42. <Emphasis>category</Emphasis> argument
  43. is the locale category to set.
  44. A locale category is a
  45. group of data types whose output formatting varies according to
  46. locale in a similar way.
  47. ISO C and &str-XX; locale categories are:
  48. </Para>
  49. <InformalExample Remap="indent">
  50. <ProgramListing>LC_ALL
  51. LC_COLLATE
  52. LC_CTYPE
  53. LC_MESSAGES
  54. LC_MONETARY
  55. LC_NUMERIC
  56. LC_TIME
  57. </ProgramListing>
  58. </InformalExample>
  59. <Para>The
  60. <Symbol Role="Variable">locale</Symbol> argument
  61. is the name of the
  62. locale to set the indicated category to.
  63. The value of
  64. <Symbol Role="Variable">locale</Symbol> is implementation-defined.
  65. <![ %CDE.C.SUN; [For example, Solaris defines such locales as
  66. <Literal>C</Literal>, <Literal>de</Literal>, <Literal>fr</Literal>, <Literal>it</Literal>, etc.
  67. ]]></Para>
  68. </RefSect1>
  69. <RefSect1>
  70. <Title>ERRORS</Title>
  71. <Para>The ToolTalk service may return the following error
  72. in processing the
  73. <Symbol Role="Message">Set_Locale</Symbol> request:
  74. </Para>
  75. <VariableList>
  76. <VarListEntry>
  77. <Term>TT_DESKTOP_EINVAL</Term>
  78. <ListItem>
  79. <Para>The
  80. <Symbol Role="Variable">locale</Symbol> argument is not valid on the handler's host.
  81. </Para>
  82. </ListItem>
  83. </VarListEntry>
  84. </VariableList>
  85. </RefSect1>
  86. <RefSect1>
  87. <Title>APPLICATION USAGE</Title>
  88. <Para>The
  89. &cdeman.ttdt.session.join;, function can be used to register for,
  90. and transparently process, the
  91. <Symbol Role="Message">Set_Locale</Symbol> request.
  92. </Para>
  93. </RefSect1>
  94. <RefSect1>
  95. <Title>EXAMPLES</Title>
  96. <Para>The
  97. <Symbol Role="Message">Set_Locale</Symbol> request can be sent as in the following example:
  98. </Para>
  99. <InformalExample Remap="indent">
  100. <ProgramListing>Tt_message msg = tttk_message_create(0, TT_REQUEST, TT_SESSION,
  101. the_recipient_procid, TTDT_SET_LOCALE,
  102. my_callback);
  103. tt_message_arg_add(msg, TT_IN, Tttk_string, "LC_MONETARY");
  104. tt_message_arg_add(msg, TT_IN, Tttk_string, "de");
  105. tt_message_send(msg);
  106. </ProgramListing>
  107. </InformalExample>
  108. </RefSect1>
  109. <![ %CDE.C.CDE; [
  110. <RefSect1>
  111. <Title>WARNINGS</Title>
  112. <Para><Symbol Role="Message">Set_Locale</Symbol> can also be sent as a multicast notice, as an
  113. <Emphasis>edict</Emphasis> to all tools in the scope of the message.
  114. The consequences of doing so can be severe and unexpected.
  115. </Para>
  116. </RefSect1>
  117. ]]>
  118. <RefSect1>
  119. <Title>SEE ALSO</Title>
  120. <Para><Function>setlocale</Function>3C <![ %CDE.C.XO; [in the &str-Zk;,
  121. ]]><![ %CDE.C.SUN; [<Emphasis>Solaris</Emphasis> <Emphasis>2.3</Emphasis> <Emphasis>Developer's</Emphasis> <Emphasis>Guide</Emphasis> <Emphasis>to</Emphasis> <Emphasis>Internationalization;</Emphasis> ]]>&cdeman.tt.message.arg.add;, &cdeman.tt.message.send;, &cdeman.ttdt.sender.imprint.on;, &cdeman.ttdt.session.join;; <Symbol Role="Message">Get_Locale</Symbol> request.
  122. </Para>
  123. </RefSect1>
  124. </RefEntry>
  125. <!--fickle 1.12 mancsf-to-docbook 1.2 08/07/95 23:18:47-->