GlobalValueSetTranslation defines language-specific translations for values in a GlobalValueSet. A global value set supplies shared choices to multiple custom picklist fields, potentially across objects. A translation can therefore affect more than one field or object; its scope depends on which fields use the associated value set.
This component translates the shared values, not the fields that consume them. Its name associates it with a global value set, not with a CustomObject.
Key Elements
| Element | What the Element Controls |
|---|---|
fullName |
The component identity, inherited from Metadata. The name follows <valueSetName>-<languageCode>, such as Numbers-fr. |
valueTranslation |
A repeated entry that pairs an original value name with its translation. It identifies a value within the associated global value set, not a consuming field. |
masterLabel |
Required within each valueTranslation. Contains the original, untranslated name of the value. |
translation |
The translated value name. An untranslated value can instead contain an XML comment with the original text; that comment is not a completed translation. |
Behavior and Constraints
The language is identified by the component-name suffix. For example, Numbers-fr identifies French translations for the Numbers global value set. Preserve any namespace in the value set name and the complete language-code suffix when resolving the association.
Each translation remains paired with its original masterLabel. For example, an entry can pair Three with Trois. An untranslated entry can pair Five with <translation><!-- Five --></translation>. The presence of that entry does not mean that Five has been translated. Counting valueTranslation entries alone does not establish complete language coverage.
Deployment and Retrieval
Retrieve and deploy this component through Metadata API. In Metadata API file format, components are stored in the globalValueSetTranslations folder and use the .globalValueSetTranslation suffix.
-
File name: Use
<valueSetName>-<languageCode>.globalValueSetTranslation. For example,Numbers-fr.globalValueSetTranslation. -
Manifest selection: In
package.xml, useGlobalValueSetTranslationas the type name and a component name such asNumbers-fras the member. -
Wildcard retrieval: This type supports
*in the manifest'smemberselement.
A correctly formed component name does not establish that the associated global value set exists in the destination org. The naming association alone also does not require the two components to be deployed together or prescribe a deployment order.
When reviewing retrieved content, distinguish actual translated text from XML comments inside translation. A file can contain entries for untranslated values.
Relationships
The connection to the shared value set is name-based, rather than an XML reference element. Translation entries identify values within that set; they do not identify the fields or objects that use it.
-
GlobalValueSet: associated by the component-name pattern<valueSetName>-<languageCode>. Preserve the namespace and full language suffix. This association does not establish actual usage in an org or authorize deleting either component.
Reported Issues
-
Tooling API retrieval was reported as unavailable for global picklist translations. In November 2018, an answer to a question about querying the
GlobalValueSetTooling API resource stated that Tooling API had no resource for these translations and recommended Metadata API instead. This is a reported limitation, not confirmation of current Tooling API coverage. Read the Tooling API discussion.
Common Questions
How do I retrieve global value set translations?
Use Metadata API with GlobalValueSetTranslation in package.xml. Select a member such as Numbers-fr, or use the supported * wildcard.
What does the name Numbers-fr mean?
It identifies French translations for the Numbers global value set. The part before the language suffix identifies the value set, not an object.
Why does a translation entry contain only an XML comment?
An untranslated value can be serialized with its original text as a comment inside translation. The entry preserves its pairing with masterLabel, but it is not a completed translation.
Can one translation change affect multiple objects?
Yes. Multiple custom picklist fields can share a global value set, including fields on different objects. The impact depends on which fields use that set.