|
ITK Function Reference
(V10000.1.0.60_20160308.00) |
Modules | |
| TextServer Errors | |
Macros | |
| #define | TC_free_text MEM_free |
| #define | txt_text(ts, keyStr) txt_noSubText(ts, keyStr, 0) |
| #define | txt_texts(ts, keyStr, subStr) txt_subText(ts, keyStr, 0, subStr, NULL, NULL, NULL, NULL) |
Typedefs | |
| typedef void * | txt_t |
Functions | |
| TEXTSRV_API char * | TC_hier_text (const char *hierarchy_name, const char *key) |
| TEXTSRV_API char * | TC_product_text (const char *key) |
| TEXTSRV_API char * | TC_text (const char *key) |
| TEXTSRV_API char * | TC_text_arg (const char *key, const char *arg) |
| TEXTSRV_API int | TC_text_get_current_Java_locale (char **current_java_locale) |
| TEXTSRV_API int | TC_text_get_current_W3C_locale (char **current_w3_locale) |
| TEXTSRV_API int | TC_text_get_locales_check_message (char **warning_message) |
| TEXTSRV_API char * | TC_text_required (const char *key) |
| TEXTSRV_API char * | TC_unsubst_text (const char *key) |
| TEXTSRV_API txt_t | txt_ctor (const char *) |
| TEXTSRV_API void | txt_destructor (txt_t ts) |
| TEXTSRV_API char * | txt_noSubText (txt_t, const char *, int) |
| TEXTSRV_API char * | txt_subText (txt_t, const char *, int, const char *s1, const char *s2, const char *s3, const char *s4, const char *s5) |
| TEXTSRV_API int | TXTSRV_convertStatusFromCodeToString (char translation_status_code, char **translation_status_name) |
| TEXTSRV_API int | TXTSRV_convertStatusFromStringToCode (char *translation_status_name, char *translation_status_code) |
| TEXTSRV_API int | TXTSRV_get_localized_languages_list (int *nb_of_languages, char ***language_code_list, char ***language_name_list) |
| TEXTSRV_API int | TXTSRV_get_localized_property_value_display_languages (int *nb_of_languages, char ***language_code_list, char ***language_name_list) |
| TEXTSRV_API int | TXTSRV_get_localized_property_value_entry_language (char **language_code, char **language_name) |
| TEXTSRV_API int | TXTSRV_get_search_language (char **language_code, char **language_name) |
| TEXTSRV_API int | TXTSRV_get_site_master_language (char **language_code, char **language_name) |
| TEXTSRV_API int | TXTSRV_get_substituted_text_resource (const char *key, const char *parameter_1, const char *parameter_2, const char *parameter_3, const char *parameter_4, const char *parameter_5, const char *parameter_6, const char *parameter_7, char **substituted_text_resource) |
| TEXTSRV_API int | TXTSRV_get_supported_languages_list (int *nb_of_languages, char ***language_code_list, char ***language_name_list) |
| TEXTSRV_API int | TXTSRV_get_unsubstituted_text_resource (const char *key, char **substituted_text_resource) |
| TEXTSRV_API int | TXTSRV_getAllTranslationStatusCodesNamesAndDescriptions (int *number_of_statuses, char **translation_status_codes, char ***translation_status_names, char ***translation_status_descriptions) |
| TEXTSRV_API int | TXTSRV_getAllTranslationStatusNamesAndDescriptions (int *number_of_statuses, char ***translation_status_names, char ***translation_status_descriptions) |
| TEXTSRV_API int | TXTSRV_getTranslationStatusNameAndDescription (char translation_status_code, char **translation_status_name, char **translation_status_description) |
Translation Statuses | |
Definition of the different translation status codes applied to translatable properties | |
| #define | TC_TRANSLATIONSTATUS_master 'M' |
| #define | TC_TRANSLATIONSTATUS_approved 'A' |
| #define | TC_TRANSLATIONSTATUS_pending 'P' |
| #define | TC_TRANSLATIONSTATUS_in_review 'R' |
| #define | TC_TRANSLATIONSTATUS_invalid 'I' |
| #define | TC_TRANSLATIONSTATUS_ghost 'G' |
Enables retrieving of text resources (translatable and non-translatable, as stored in TextServer xml files).
| #define TC_free_text MEM_free |
Frees the specified block of storage (transient or persistent) for reuse.
If the pointer is a NULL value then no operation is performed.
| [in] | void | *ptr The pointer to a block of memory to be deallocated. |
Definition at line 408 of file textserver.h.
| #define TC_TRANSLATIONSTATUS_approved 'A' |
Defines the translation status of Approved
Definition at line 38 of file textserver.h.
| #define TC_TRANSLATIONSTATUS_ghost 'G' |
Defines the translation status of Ghost. This is purely for internal processing
Definition at line 50 of file textserver.h.
| #define TC_TRANSLATIONSTATUS_in_review 'R' |
Defines the translation status of In Review
Definition at line 44 of file textserver.h.
| #define TC_TRANSLATIONSTATUS_invalid 'I' |
Defines the translation status of Invalid
Definition at line 47 of file textserver.h.
| #define TC_TRANSLATIONSTATUS_master 'M' |
Defines the translation status of Master
Definition at line 35 of file textserver.h.
| #define TC_TRANSLATIONSTATUS_pending 'P' |
Defines the translation status of Pending
Definition at line 41 of file textserver.h.
| #define txt_text | ( | ts, | |
| keyStr | |||
| ) | txt_noSubText(ts, keyStr, 0) |
Macro for no variable substitution (i.e. the text resource does not contain any parameter).
Definition at line 413 of file textserver.h.
| #define txt_texts | ( | ts, | |
| keyStr, | |||
| subStr | |||
| ) | txt_subText(ts, keyStr, 0, subStr, NULL, NULL, NULL, NULL) |
Macro for one variable substitution (i.e. the text resource contains only one parameter).
Definition at line 418 of file textserver.h.
| typedef void* txt_t |
Defines a pointer to a TextServer object.
Definition at line 56 of file textserver.h.
| TEXTSRV_API char* TC_hier_text | ( | const char * | hierarchy_name, |
| const char * | key | ||
| ) |
Use key to fetch string from a hier, either in gizmolocal.uih or a local.uih, when given an hierarchy name
| TEXTSRV_API char* TC_product_text | ( | const char * | key | ) |
Returns the name of the product.
| TEXTSRV_API char* TC_text | ( | const char * | key | ) |
Returns the text resource through the key identifier.
Use preferably TXTSRV_get_substituted_text_resource or TXTSRV_get_unsubstituted_text_resource instead.
| TEXTSRV_API char* TC_text_arg | ( | const char * | key, |
| const char * | arg | ||
| ) |
Returns the text resource through the key identifier and replaces the first parameter of the string.
Use preferably TXTSRV_get_substituted_text_resource instead.
| TEXTSRV_API int TC_text_get_current_Java_locale | ( | char ** | current_java_locale | ) |
Returns the Java-standardized locale being used by the TCServer. For instance, the client can request a connection in Canadian French, which will be served in French French (fr_FR) internally (internal locale format is Java standard).
| current_java_locale | (OF) Current Java-standardized locale |
| TEXTSRV_API int TC_text_get_current_W3C_locale | ( | char ** | current_w3_locale | ) |
Returns the W3C-standardized locale being requested and served for the connection with the TCServer. This information is mainly used by the Thin client. For instance, the Thin client can request a connection in Austrian German (de-AT), which will be served in German German (de_DE) internally (internal locale format is Java standard).
| current_w3_locale | (OF) Current W3C-standardized locale |
| TEXTSRV_API int TC_text_get_locales_check_message | ( | char ** | warning_message | ) |
Used in a Thin client connection configuration in order to present the locale rejection message. Once the call is made, any subsequent calls will return an empty string.
| warning_message | (OF) Warning message |
| TEXTSRV_API char* TC_text_required | ( | const char * | key | ) |
Returns the text resource through the key identifier, and raises and error (through ERROR_internal) if no translation is found.
Use preferably TXTSRV_get_substituted_text_resource or TXTSRV_get_unsubstituted_text_resource instead.
| TEXTSRV_API char* TC_unsubst_text | ( | const char * | key | ) |
Returns the Teamcenter text for a key without substituting the %n$ values Use preferably TXTSRV_get_substituted_text_resource or TXTSRV_get_unsubstituted_text_resource instead.
| TEXTSRV_API txt_t txt_ctor | ( | const char * | ) |
| TEXTSRV_API void txt_destructor | ( | txt_t | ts | ) |
| TEXTSRV_API char* txt_noSubText | ( | txt_t | , |
| const char * | , | ||
| int | |||
| ) |
Returns the text resource without any substitution.
| TEXTSRV_API char* txt_subText | ( | txt_t | , |
| const char * | , | ||
| int | , | ||
| const char * | s1, | ||
| const char * | s2, | ||
| const char * | s3, | ||
| const char * | s4, | ||
| const char * | s5 | ||
| ) |
| TEXTSRV_API int TXTSRV_convertStatusFromCodeToString | ( | char | translation_status_code, |
| char ** | translation_status_name | ||
| ) |
Provides a means to convert a status from its actual code to its localized name.
| translation_status_code | (I) The internal representation of the status. |
| translation_status_name | (0F) The localized name of the status. |
| TEXTSRV_API int TXTSRV_convertStatusFromStringToCode | ( | char * | translation_status_name, |
| char * | translation_status_code | ||
| ) |
Provides a means to convert a status from a name to its actual code representation. The name can be:
The method returns:
| translation_status_name | (I) The name of the status. |
| translation_status_code | (O) The status code corresponding to the status name. |
| TEXTSRV_API int TXTSRV_get_localized_languages_list | ( | int * | nb_of_languages, |
| char *** | language_code_list, | ||
| char *** | language_name_list | ||
| ) |
Retrieves the list of Java-standard formatted name of languages that are supported by the system and specified in the BMIDE Global Constant Fnd0SelectedLocales. (i.e. intersection of the server machine, the database and Global Constant).
| nb_of_languages | (O) Number of languages |
| language_code_list | (OF) nb_of_languages Lists of 5-letter codes of all the languages supported by the system. |
| language_name_list | (OF) nb_of_languages Lists the localized names of all the languages supported by the system and Fnd0SelectedLocales. |
| TEXTSRV_API int TXTSRV_get_localized_property_value_display_languages | ( | int * | nb_of_languages, |
| char *** | language_code_list, | ||
| char *** | language_name_list | ||
| ) |
Retrieves the ordered list of Java-standard formatted values of languages that can be used for displaying localized property values. The preference values should always be retrieved using the associated ITK API or SOA operation. The associated access methods need to do the following operations:
| nb_of_languages | (O) Number of languages |
| language_code_list | (OF) nb_of_languages Lists of 5-letter codes of all the languages that can be used for localized property value display. |
| language_name_list | (OF) nb_of_languages Lists the localized names of all the languages that can be used for localized property value display. |
| TEXTSRV_API int TXTSRV_get_localized_property_value_entry_language | ( | char ** | language_code, |
| char ** | language_name | ||
| ) |
Retrieves the Java-standard formatted name of the language to be used for localized property values entries. The preference value should always be retrieved using the associated ITK API or SOA operation. The TC_language_data_entry (Site) defines the list of locales to be used for data entry. The TC_language_localized_property_value_entry (User, Role, Group, Site) defines the sub-value as preferred by the user. Since both preference entry are a result of manual modifications, we need to check that they are not off from the reality. Therefore, the check will be:
| language_code | (OF) 5-letter code of the language used for localized property value entry. |
| language_name | (OF) Localized name of the language used for localized property value entry. |
| TEXTSRV_API int TXTSRV_get_search_language | ( | char ** | language_code, |
| char ** | language_name | ||
| ) |
Retrieves the Java-standard formatted name of the language used for Search operations. The preference value should always be retrieved using the associated ITK API or SOA operation. The associated access methods need to do the following operations:
| language_code | (OF) 5-letter codeof the language used for Search operations. |
| language_name | (OF) Localized name of the language used for Search operations. |
| TEXTSRV_API int TXTSRV_get_site_master_language | ( | char ** | language_code, |
| char ** | language_name | ||
| ) |
Provides the site master language if set otherwise returns the current locale.
| language_code | (OF) 5-letter code of the language used for localized property value entry. |
| language_name | (OF) Localized name of the language used for localized property value entry. |
| TEXTSRV_API int TXTSRV_get_substituted_text_resource | ( | const char * | key, |
| const char * | parameter_1, | ||
| const char * | parameter_2, | ||
| const char * | parameter_3, | ||
| const char * | parameter_4, | ||
| const char * | parameter_5, | ||
| const char * | parameter_6, | ||
| const char * | parameter_7, | ||
| char ** | substituted_text_resource | ||
| ) |
Retrieves a text resource through the key identifier, and substitutes the potential string parameters with the input parameters.
If a parameter is not needed, a null pointer can be provided.
| key | (I) The key used to retrieve the text resource from the xml file. |
| parameter_1 | (I) The value to be substituted to the first parameter. |
| parameter_2 | (I) The value to be substituted to the second parameter. |
| parameter_3 | (I) The value to be substituted to the third parameter. |
| parameter_4 | (I) The value to be substituted to the fourth parameter. |
| parameter_5 | (I) The value to be substituted to the fifth parameter. |
| parameter_6 | (I) The value to be substituted to the sixth parameter. |
| parameter_7 | (I) The value to be substituted to the seventh parameter. |
| substituted_text_resource | (OF) The substituted text resource |
| TEXTSRV_API int TXTSRV_get_supported_languages_list | ( | int * | nb_of_languages, |
| char *** | language_code_list, | ||
| char *** | language_name_list | ||
| ) |
Retrieves the list of Java-standard formatted name of languages that are supported by the system (i.e. the server machine and the database).
| nb_of_languages | (O) Number of languages |
| language_code_list | (OF) nb_of_languages Lists of 5-letter codes of all the languages supported by the system. |
| language_name_list | (OF) nb_of_languages Lists the localized names of all the languages supported by the system. |
| TEXTSRV_API int TXTSRV_get_unsubstituted_text_resource | ( | const char * | key, |
| char ** | substituted_text_resource | ||
| ) |
Retrieves a text resource through the key identifier.
If the resource does not contain any parameter, this will be equivalent to calling TXTSRV_get_substituted_text_resource and providing a null pointer for each parameter.
If the resource contains some parameters, the string will show the unsubstituted parameters (e.g. 'The remaining monthly usage for the user "%1$" is %2$ unique calendar days and %3$ hours before reaching the limit of usage for an occasional user.').
| key | (I) The key used to retrieve the text resource from the xml file. |
| substituted_text_resource | (OF) The substituted text resource |
| TEXTSRV_API int TXTSRV_getAllTranslationStatusCodesNamesAndDescriptions | ( | int * | number_of_statuses, |
| char ** | translation_status_codes, | ||
| char *** | translation_status_names, | ||
| char *** | translation_status_descriptions | ||
| ) |
Returns the codes, localized names and descriptions of all the translation statuses.
| number_of_statuses | (O) The number of translation statuses. |
| translation_status_codes | (OF) number_of_statuses An ordered array of char representing the different statuses. |
| translation_status_names | (OF) number_of_statuses An ordered array of localized translation status names. |
| translation_status_descriptions | (OF) number_of_statuses An ordered array of localized translation status descriptions. |
| TEXTSRV_API int TXTSRV_getAllTranslationStatusNamesAndDescriptions | ( | int * | number_of_statuses, |
| char *** | translation_status_names, | ||
| char *** | translation_status_descriptions | ||
| ) |
Returns the localized names and descriptions of all the translation statuses, in the predefined logical order Master, Approved, Pending, In Review.
| number_of_statuses | (O) The number of translation statuses. |
| translation_status_names | (OF) number_of_statuses An ordered array of localized translation status names. |
| translation_status_descriptions | (OF) number_of_statuses An ordered array of localized translation status descriptions. |
| TEXTSRV_API int TXTSRV_getTranslationStatusNameAndDescription | ( | char | translation_status_code, |
| char ** | translation_status_name, | ||
| char ** | translation_status_description | ||
| ) |
Returns the name and the description associated with a given translation status code.
| translation_status_code | (I) The translation status code for which the information is requested. |
| translation_status_name | (OF) The localized name for the requested status. |
| translation_status_description | (OF) The localized description for the requested status. |