version 1.8, 2006/08/16 19:34:35
|
version 1.10, 2008/05/06 21:05:22
|
|
|
<td style="vertical-align: top;">Section 2.2.5. Added information how to write platform specific messages.<br> | <td style="vertical-align: top;">Section 2.2.5. Added information how to write platform specific messages.<br> |
</td> | </td> |
</tr> | </tr> |
|
<tr> |
|
<td style="vertical-align: top;">01/23/07<br> |
|
</td> |
|
<td style="vertical-align: top;">Sushma Fernandes<br> |
|
</td> |
|
<td style="vertical-align: top;">Section 2.2.5. Added information on special considerations while creating a new message.<br> |
|
</td> |
|
</tr> |
</tbody> | </tbody> |
</table> | </table> |
<p><br> | <p><br> |
|
|
details. </td> | details. </td> |
</tr> | </tr> |
<tr> | <tr> |
<td>Boolean useICUfallback</td> |
|
<td>Input <br> |
|
Optional <br> |
|
Default = false</td> |
|
<td>If true, use ICU's fallback mechnism to search more general |
|
resource bundles if the msg_id cannot be found. Note: the |
|
recommended setting is false if you are using an AcceptLanguageList from a |
|
CIM client. The Accept-Languages HTTP header from the client |
|
contains the fallback specifications. Using ICU's fallback in this |
|
case may lead to returning a language that the client didn't ask for.</td> |
|
</tr> |
|
<tr> |
|
<td>Formatter::Arg arg0; <br> | <td>Formatter::Arg arg0; <br> |
Formatter::Arg arg1; <br> | Formatter::Arg arg1; <br> |
Formatter::Arg arg2; <br> | Formatter::Arg arg2; <br> |
|
|
MessageLoaderParms that it gets. The MessageLoader will use the | MessageLoaderParms that it gets. The MessageLoader will use the |
default process locale, as determined by ICU, in this case. <br> | default process locale, as determined by ICU, in this case. <br> |
</p> | </p> |
<p><i>Important Note:</i> The MessageLoader defaults to <i>not </i>use |
<p><i>Important Note:</i> The MessageLoader does <i>not</i> use |
the "fallback" mechanism described in the ICU Resource Management | the "fallback" mechanism described in the ICU Resource Management |
section. This is because the Accept-Language header itself | section. This is because the Accept-Language header itself |
describes the fallback that the client wants. However, the |
describes the fallback that the client wants. If the |
MessageLoader does "fallback" to the root resource bundle if none of the |
MessageLoader cannot find a message file for any of the languages |
languages in AcceptLanguageList can be found. If the root resource |
in the AcceptLanguageList, it will try the default process locale. |
bundle cannot be found, then the default_msg is returned. The |
If this fails, the ICU root resource bundle will be tried.<br> |
"useICUFallback" flag can be set to have MessageLoader use ICU fallback |
|
on all message load attempts. However, usage of this flag for |
|
client requests may lead to incorrect results. For example, a |
|
client sets Accept-Language to french, german, and spanish, in that |
|
order, but there is no french resource bundle. A call to |
|
MessageLoader with useICUfallback == true would cause the root resource |
|
bundle string to be returned on the attempt to load from the french |
|
bundle. But the client requested german to be the fallback after |
|
french. <br> |
|
</p> | </p> |
<p>Please refer to the following files for details on the new Pegasus | <p>Please refer to the following files for details on the new Pegasus |
classes. <br> | classes. <br> |
|
|
text, it is not necessary to create a new message, but the existing one should | text, it is not necessary to create a new message, but the existing one should |
be updated.</p> | be updated.</p> |
| |
|
<p><b>Are there any special considerations while creating a new message ? </b></p> |
|
|
|
<ul> |
|
<li>If a message definition contains text within a single quote |
|
it is not interpreted in any way. |
|
|
|
<p><i>Example:</i></p> |
|
<p> Server.CIMOperationRequestAuthorizer.NOT_IN_AUTHORIZED_GRP: |
|
string {"PGS05202: User '{0}' is not authorized to access CIM data."} |
|
</p> |
|
|
|
<p><i>Processed message:</i></p> |
|
<p> User {0} is not authorized to access CIM data. </p> |
|
</li> |
|
|
|
<li> For a single quote to appear in a processed message, it needs to be preceded by |
|
another single quote. |
|
|
|
<p><i>Example:</i></p> |
|
<p> Server.CIMOperationRequestAuthorizer.NOT_IN_AUTHORIZED_GRP: |
|
string {"PGS05202: User ''{0}'' is not authorized to access CIM data."} |
|
</p> |
|
|
|
<p><i>Processed message:</i></p> |
|
<p> User 'wbemuser' is not authorized to access CIM data. </p> |
|
</li> |
|
|
|
<li> For a double quote to appear in a processed message, it needs to be preceded by |
|
a back slash. |
|
|
|
<p><i>Example:</i></p> |
|
<p> |
|
ControlProviders.ProviderRegistrationProvider.ProviderRegistrationProvider. |
|
UNSUPPORTED_USERCONTEXT_VALUE:string {"PGS03029: Unsupported UserContext |
|
value: \"{0}\"."} |
|
</p> |
|
|
|
<p><i>Processed message:</i></p> |
|
<p> Unsupported UserContext value: "10". </p> |
|
</li> |
|
</ul> |
|
|
|
<p> </p> |
|
|
<p><b>How do I write a platform specific | <p><b>How do I write a platform specific |
message ? </b></p> | message ? </b></p> |
| |