Newer Version Available
CustomObjectTranslation
Declarative Metadata File Suffix and Directory Location
Translations are stored in a file with a format of customObjectName__c-lang.objectTranslation, where customObjectName__c is the custom object name, and lang is the translation language. A sample file name for German translations is myCustomObject__c-de.objectTranslation.
Custom object translations are stored in the objectTranslations folder in the corresponding package directory.
Version
CustomObjectTranslation components are available in API version 14.0 and later.
Fields
| Field | Field Type | Description |
|---|---|---|
| caseValues | ObjectNameCaseValue[] | Different combinations of the custom object with regard to article, plural, possessive, and case. |
| fields | CustomFieldTranslation[] | A list of translations for the custom fields associated with the custom object. |
| fieldSets | FieldSetTranslation[] | A list of field set translations. Available in API version 41.0 and later. |
| fullName | string | The name of the custom object and the translation language with a
format of
customObjectName-lang,
where customObjectName is the custom object name,
and lang is the translation language. Inherited from Metadata, this field is not defined in the WSDL for this metadata type. It must be specified when creating, updating, or deleting. See create() to see an example of this field specified for a call. |
| gender | Gender | Indicates the gender of the noun that represents the object. This is used for languages where words need different treatment depending on their gender. |
| layouts | LayoutTranslation[] | A list of page layout translations. |
| nameFieldLabel | string | The label for the name field. Maximum of 765 characters. |
| namedFilters | NamedFilterTranslation[] | A list of translations for lookup filter error messages
associated with the custom object. This field has been removed as of API version 30.0 and is only available in prior versions. The translation metadata associated with a lookup filter is now represented by the lookupFilter field in the CustomFieldTranslation subtype. |
| quickActions | QuickActionTranslation[] | A list of translations for actions. |
| recordTypes | RecordTypeTranslation[] | A list of record type translations. |
| sharingReasons | SharingReasonTranslation[] | A list of sharing reason translations. |
| startsWith | StartsWith (enumeration of type string) | Indicates whether the noun starts with a vowel, consonant, or is a special character. This is used for languages where words need different treatment depending on the first character. |
| validationRules | ValidationRuleTranslation[] | A list of validation rule translations. |
| webLinks | WebLinkTranslation[] | A list of web link translations. |
| workflowTasks | WorkflowTaskTranslation[] | A list of workflow task translations. |
CustomFieldTranslation
CustomFieldTranslation contains details for a custom field translation. In API versions 37.0 and earlier standard picklist values could be translated with CustomFieldTranslation. In API version 38.0, use StandardValueSetTranslation instead. For more details, see CustomField.
| Field | Field Type | Description |
|---|---|---|
| caseValues | ObjectNameCaseValue[] | Different combinations of the custom object with regard to article, plural, possessive, and case. Available in API version 29.0 and later. |
| description | string | Translation for the custom field description. |
| gender | Gender | Indicates the gender of the noun that represents the object. This is used for languages where words need different treatment depending on their gender. Available in API version 29.0 and later. |
| help | string | Translation for the text that displays in the field-level help hover text for this field. |
| label | string | Translation for the label. Maximum of 765 characters. |
| lookupFilter | LookupFilterTranslation |
Represents the translation
metadata associated with a lookup filter. This field is
available in API version 30.0 and later.
|
| name | string | Required. The name of the field relative to the custom object; for example, MyField__c. |
| picklistValues | PicklistValueTranslation[] | List of translations for picklist values. See PicklistValue. Note: “Subject” on the Task object is a text field, not a picklist value. It can’t be retrieved via Metadata API. Translations can be provided via the Translation Workbench. |
| relationshipLabel | string | Translation for a lookup relationship label. A lookup relationship allows a field to be associated with another field. The relationship field allows users to select an option from a list of values defined by the other field. Maximum of 765 characters. |
| startsWith | StartsWith (enumeration of type string) | Indicates whether the noun starts with a vowel, consonant, or is a special character. This is used for languages where words need different treatment depending on the first character. Available in API version 29.0 and later. |
FieldSetTranslation
FieldSetTranslation contains details for a field set translation. For more details, see FieldSet. Available in API 41.0 and later.
| Field | Field Type | Description |
|---|---|---|
| label | string | Required. Translation for the field set label. Maximum of 765 characters. |
| name | string | Required. The field set name. |
LayoutTranslation
LayoutTranslation contains details for a page layout translation. For more details, see Fields.
| Field | Field Type | Description |
|---|---|---|
| layout | string | Required. The layout name. |
| layoutType | string | |
| sections | LayoutSectionTranslation[] | An array of layout section translations. |
LayoutSectionTranslation
LayoutSectionTranslation contains details for a page layout section translation. For more details, see LayoutSection.
| Field | Field Type | Description |
|---|---|---|
| label | string | Required. Translation for the label. Maximum of 765 characters. |
| section | string | Required. The section name. |
LookupFilterTranslation
LookupFilterTranslation shows a translation for a lookup filter error message associated with the custom object. Replaces NamedFilterTranslation.
LookupFilterTranslation is available in API version 30.0 and later.
| Field | Field Type | Description |
|---|---|---|
| errorMessage | string | The error message that appears if the lookup filter fails. |
| informationalMessage | string | The information message displayed on the page. Use to describe things the user might not understand, such as why certain items are excluded in the lookup filter. |
NamedFilterTranslation
NamedFilterTranslation has been removed as of API version 30.0 and is only available in previous API versions.
NamedFilterTranslation shows a list of translations for lookup filter error messages associated with the custom object. See NamedFilter for more information.
| Field | Field Type | Description |
|---|---|---|
| errorMessage | string | The error message that appears if the lookup filter fails. |
| informationalMessage | string | The information message displayed on the page. Use to describe things the user might not understand, such as why certain items are excluded in the lookup filter. |
| name | string | Required. The name of the lookup filter. If you create this field in the user interface, a name is automatically assigned. If you create this field through Metadata API, you must include the name field. |
ObjectNameCaseValue
ObjectNameCaseValue supports multiple cases and definitions of the custom object name to allow usage in various grammatical contexts.
| Field | Field Type | Description |
|---|---|---|
| article | Article (enumeration of type string) | English has two types of articles: definite
(the) and indefinite (a,
an). The usage of these articles depends
mainly on whether you are referring to any member of a group, or to
a specific member of a group. The valid values are:
|
| caseType | CaseType (enumeration of type string) | The case of the custom object name. The valid values are:
|
| plural | boolean | Indicates whether the value field is plural (true) or singular (false). |
| possessive | Possessive (enumeration of type string) | The possessive case of
a language is a grammatical case used to indicate a relationship of
possession. The valid values are:
|
| value | string | Required. The value or label in this grammatical context. |
PicklistValueTranslation
PicklistValueTranslation contains details for translation of a picklist value from a local, custom picklist field. For more details, see Picklist (Including Dependent Picklist).
| Field | Field Type | Description |
|---|---|---|
| masterLabel | string | Required. The picklist value defined on the setup page in the application is your master label. The master label is displayed wherever a translated label is not available. |
| translation | string | Required. Translation for the value. |
QuickActionTranslation
QuickActionTranslation contains details for an action label in the user interface. For more information, see QuickAction.
| Field | Field Type | Description |
|---|---|---|
| label | string | Required. Translation for the label. Maximum of 765 characters. |
| name | string | Required. The quick action name. |
RecordTypeTranslation
RecordTypeTranslation contains details for a record type name translation. For more details, see RecordType.
| Field | Field Type | Description |
|---|---|---|
| label | string | Required. Translation for the label. Maximum of 765 characters. |
| name | string | Required. The record type name. |
| description | string | Translation for the record type description. Available in API version 42.0 and later. |
SharingReasonTranslation
SharingReasonTranslation contains details for a sharing reason translation. For more details, see SharingReason.
| Field | Field Type | Description |
|---|---|---|
| label | string | Required. Translation for the sharing reason. |
| name | string | Required. The sharing reason name. |
ValidationRuleTranslation
ValidationRuleTranslation contains details for a validation rule translation. For more details, see ValidationRule.
| Field | Field Type | Description |
|---|---|---|
| errorMessage | string | Required. Translation for the error message associated with the validation rule failure. |
| name | string | Required. The validation rule name. |
WebLinkTranslation
WebLinkTranslation contains details for a web link translation. For more details, see WebLink.
| Field | Field Type | Description |
|---|---|---|
| label | string | Required. Translation for the web link label. Maximum of 765 characters. |
| name | string | Required. The web link name. |
WorkflowTaskTranslation
WorkflowTaskTranslation contains details for a workflow task translation. For more details, see Workflow.
| Field | Field Type | Description |
|---|---|---|
| description | string | Translation for the workflow task description. |
| name | string | Required. The workflow task name. |
| subject | string | Translation for the workflow task subject. |
Declarative Metadata Sample Definitions
This is a sample XML definition of a CustomObjectTranslation for the Description__c object in German, with one custom field, Summary__c. The name and location of the file containing this definition would be objectTranslations/Description__c-de.objectTranslation.
1<?xml version="1.0" encoding="UTF-8"?>
2<CustomObjectTranslation xmlns="http://soap.sforce.com/2006/04/metadata">
3 <caseValues>
4 <caseType>Nominative</caseType>
5 <plural>false</plural>
6 <value>Beschreibung</value>
7 </caseValues>
8 <caseValues>
9 <caseType>Nominative</caseType>
10 <plural>true</plural>
11 <value>Beschreibungen</value>
12 </caseValues>
13 <caseValues>
14 <caseType>Accusative</caseType>
15 <plural>false</plural>
16 <value>Beschreibung</value>
17 </caseValues>
18 <caseValues>
19 <caseType>Accusative</caseType>
20 <plural>true</plural>
21 <value>Beschreibungen</value>
22 </caseValues>
23 <caseValues>
24 <caseType>Genitive</caseType>
25 <plural>false</plural>
26 <value>Beschreibung</value>
27 </caseValues>
28 <caseValues>
29 <caseType>Genitive</caseType>
30 <plural>true</plural>
31 <value>Beschreibungen</value>
32 </caseValues>
33 <caseValues>
34 <caseType>Dative</caseType>
35 <plural>false</plural>
36 <value>Beschreibung</value>
37 </caseValues>
38 <caseValues>
39 <caseType>Dative</caseType>
40 <plural>true</plural>
41 <value>Beschreibungen</value>
42 </caseValues>
43 <fields>
44 <label>Zusammenfassung</label>
45 <name>Summary__c</name>
46 </fields>
47 <gender>Feminine</gender>
48 <nameFieldLabel>Beschreibungen</nameFieldLabel>
49</CustomObjectTranslation>This is a sample XML definition of a CustomObjectTranslation for the Account object, renaming Account to Client (Kunde) in German. The Account object has one standard field, account_number, and one custom field, Account_Code__c. The name and location of the file containing this definition would be objectTranslations/Account-de.objectTranslation.
1<?xml version="1.0" encoding="UTF-8"?>
2<CustomObjectTranslation xmlns="http://soap.sforce.com/2006/04/metadata">
3 <caseValues>
4 <caseType>Nominative</caseType>
5 <plural>false</plural>
6 <value>Kunde</value>
7 </caseValues>
8 <caseValues>
9 <caseType>Nominative</caseType>
10 <plural>true</plural>
11 <value>Kunden</value>
12 </caseValues>
13 <caseValues>
14 <caseType>Accusative</caseType>
15 <plural>false</plural>
16 <value>Kunden</value>
17 </caseValues>
18 <caseValues>
19 <caseType>Accusative</caseType>
20 <plural>true</plural>
21 <value>Kunden</value>
22 </caseValues>
23 <caseValues>
24 <caseType>Genitive</caseType>
25 <plural>false</plural>
26 <value>Kunden</value>
27 </caseValues>
28 <caseValues>
29 <caseType>Genitive</caseType>
30 <plural>true</plural>
31 <value>Kunden</value>
32 </caseValues>
33 <caseValues>
34 <caseType>Dative</caseType>
35 <plural>false</plural>
36 <value>Kunden</value>
37 </caseValues>
38 <caseValues>
39 <caseType>Dative</caseType>
40 <plural>true</plural>
41 <value>Kunden</value>
42 </caseValues>
43 <fields>
44 <caseValues>
45 <caseType>Nominative</caseType>
46 <plural>false</plural>
47 <value>Kundennummer</value>
48 </caseValues>
49 <caseValues>
50 <caseType>Nominative</caseType>
51 <plural>true</plural>
52 <value>Kundennummern</value>
53 </caseValues>
54 <gender>Feminine</gender>
55 <name>account_number</name>
56 </fields>
57 <fields>
58 <label>Kunden-Code</label>
59 <name>Account_Code__c</name>
60 </fields>
61 <gender>Masculine</gender>
62</CustomObjectTranslation>