Rules and Standards |
CAA V5 NLS Compliance RulesStandard NLS rules for CAA V5 applications |
Technical Article |
AbstractMessages in V5 code should support multiple languages (National Language Support, or NLS), including Double-Byte encoded languages such as Japanese or Korean. For this to happen, strings are externalized in so-called PII files, named *.CATNls and *_en.properties depending on the underlying V5 infrastructure. Here is the set of rules that the developer should comply with in order for externalization to work properly. |
NLS-dependent data should never be stored as such in any model, except if it was entered manually by the user. In case of NLS-dependent strings made from different parts, the string should not be stored as result, and it should be dynamically computed. It is safe to store NLS keys, allowing to retrieve dynamically the associated language-dependent string.
As a result of this rule, do not use the SetName() method for a feature which would store a language-dependent name in the model for the concerned feature factory.
[Top]
Operation | CATNls-Based Infrastructure in C++ | CATNls-Based Infrastructure in java | *.properties Based Infrastructure (java) |
---|---|---|---|
Retrieve a message (with or without parameters) from NLS file | CATMessageCatalog.BuildMessage() | CATMessageCatalog.BuildMessage() in com.dassault_systemes.catjsystem | java.text.MessageFormat |
Format numbers and currencies | CATUnicodeString standard methods (nothing for currencies) | java.text.NumberFormat | |
Format dates | CATTime | java.text.DateFormat java.text.SimpleDateFormat |
|
Tokenize a string (strtok equivalent) | CATToken In case of char*, use CATSysStrtok | java.util.StringTokenizer | |
Compare strings (strcmp equivalent) | CATUnicodeString::operator== CATUnicodeString::Compare() |
String.compareTo() String.compareToIgnoreCase() |
[Top]
Version: 1.0 [Dec 2004] | Document created |
[Top] |
Copyright © 1994-2004, Dassault Systèmes. All rights reserved.