6/6/25, 8:45 Understanding the TextServer
Understanding the TextServer
Whether you want to override existing messages or create your own, you need to understand Teamcenter's TextServer. When a client needs to display a text or error
message, the TextServer searches a list of id-message pairs using a key id lookup, and then returns the appropriate string to the client. These id-message pairs are loaded
into memory by the TextServer from a set of XML files.
Examples
Below are some examples of how you might use custom, localizable text messages:
Titles for style sheets using the titleKey or textKey attributes.
Error messages for custom code using the following TC_API functions:
EMH_store_error_s1() through EMH_store_error_s7()
Text messages with custom code using the following TEXTSRV_API function:
TXTSRV_get_substituted_text_resource()
Business object type and property names using the IDE del Modelador de negocio.
Note:
Deploying a IDE del Modelador de negocio package automatically updates the TextServer XML files.
TextServer locale directories
There are two main locations for these XML files.
TC_ROOT\lang\textserver
This directory and its contents are created and maintained by the Teamcenter environment.
All OOTB text messages are contained in this location. It is not recommended to make any changes to these files.
TC_USER_MSG_DIR
You must create a directory to contain your custom XML files. You must modify the tc_profilevars script to add this environment variable and point to your
new directory.
Any text message resource contained in this location which duplicates an OOTB ID overrides the OOTB message.
Locale directory contents
The TextServer looks at each of these locations expecting a certain directory structure. See the structure of the OOTB location for guidance in creating your own. There are
two main directory types:
Localized resources These directories are named with Java-standard locale IDs. The contents of the current locale directory are used for translation
of resources.
Unlocalized resources This directory is named no_translation and is used regardless of current locale.
Add or change a resource
https://docs.sw.siemens.com/documentation/external/PL20190708094239443/es-ES/tc/12.2/help_sc/es-ES/itk/id921903/itkcusttexterror.html 1/2
6/6/25, 8:45 Understanding the TextServer
After creating your custom TC_USER_MSG_DIR location and appropriate subdirectories, Copy the following sample XML files from their OOTB location, depending on the
type of message you will be creating. These files contain additional information about creating the id-message pairs.
sample_error A starter file for creating or overriding custom error messages. Copy this file into your localized resource directories for each
language.
sample_text A starter file for nonlocalized text messages. Copy this file into your no_translation directory.
sample_text_locale A starter file for localizable text messages. Copy this file into your localized resource directories for each language.
After copying the files, change the file name to something more descriptive. You can have as many of these files as you want, and their names are not important, except as
noted below. The TextServer automatically loads all XML files in these locations, so no registration is required. It is recommended that you retain the naming convention of
the files; change the sample prefix of the name only. All files are treated as text message resources unless the file name ends with _errors.xml, in which case it is treated as
an error message resource.
Note:
Each time the tcserver process is started, the TextServer automatically loads the XML files, picking up any changes made. There is no need to regenerate a cache;
however, a process detects changes made only when it starts, not while it is running.
Learn more
Introduction to the ITK
Quick links
Guía de iniciación en Teamcenter
Conceptos básicos de Teamcenter
Glossary
Sugerencias para el uso de la ayuda
Look up more details
uih_to_xml
https://docs.sw.siemens.com/documentation/external/PL20190708094239443/es-ES/tc/12.2/help_sc/es-ES/itk/id921903/itkcusttexterror.html 2/2