Building Blocks > Common Building Blocks > Database Connection Building Block > Localization of Database Strings Using Database Tables
Localization of Database Strings Using Database Tables
Certain database strings used in the DPM solution are localized using database tables for improved performance, rather than using the localization table functionality in ThingWorx Composer. This database localization mechanism makes use of three database tables (token, language, and tokenlanguagelink) which are based on three Data Shapes from the database connection building block: PTC.DBConnection.Token, PTC.DBConnection.Language, and PTC.DBConnection.TokenLanguageLink. For more information, see Database Schema (Database Connection Building Block).
Each localized database string is paired with a _token field. For example, in the PTC.SCA.SCO.DispatchStatus Data Shape, the name field is paired with a name_token field. The _token field is a foreign key to an entry in the token database table.
The tokenlanguagelink database table connects individual entries from the token table with a language from the language table. The value column in the tokenlanguagelink table contains the translated strings. For an entry in the tokenlanguagelink table, only the translated string in the value column can be updated. The token and language values cannot be changed.
Services make use of JSON query filters to retrieve the appropriate translated string for a token based on the specified language. For more information, see Using JSON Filters in Query Services.
Translations are provided for all such database strings that are delivered with their related building blocks. Infrastructure support is in place for customers to provide translations for the names and descriptions of the reason codes that they create and import into the DPM solution. For more information, see Providing Translations for Customer-Created Reason Code Names and Descriptions
The database strings that are localized using this mechanism are found on the following Data Shapes:
Localized Database String
Data Shape
Token Field
Job order status name
PTC.SCA.SCO.DispatchStatus
name_token
Unit of measure (UOM) abbreviation
PTC.MaterialMaster.UOM
abbreviation_token
Unit of measure (UOM) description
PTC.MaterialMaster.UOM
description_token
Reason code name
PTC.ReasonCode.Reason
displayname_token
Reason code description
PTC.ReasonCode.Reason
description_token
Reason category name
PTC.ReasonCode.ReasonCategory
name_token
Reason category description
PTC.ReasonCode.ReasonCategory
description_token
Status display name
PTC.Status.StatusDefinition
displayname_token
Metric name
PTC.Metric.Metric
name_token
Metric description
PTC.Metric.Metric
description_token
Metric calculation description (formula)
PTC.Metric.Metric
calculationdescription_token
Was this helpful?