Hey All. Looking for anyone that has experience wi...
# sdf
k
Hey All. Looking for anyone that has experience with using Translations in SDF when you are translating a Custom Record Type Instance. I have been unable to find where in SDF the name translation is to be added to use one of the strings within the Translation Collection.
w
Not sure if that is possible. Last time I experimented with translations in SDF, I could only use them in scripts. Would love to learn otherwise.
k
I have been able to use them in sdf for label and titles of tabs etc but the instance name field translations works if you link an existing with the translation collection but there is nothing in sdf for that linking.
b
See Enhancement # - 446832
It’s unfortunately not supported
k
Rubbish 😂
😂 1
r
If you are defining a custom record type within your SDF project and want to include translations for instance names, you can do so by specifying the translations within the XML file that defines the custom record type. However, it’s important to note that this method might be limited by the functionality provided by SDF at the time and might not be supported for all types of fields or records. Here’s a hypothetical example of what that could look like within the XML definition of a custom record type:
Copy code
xml
<customrecordtype>
    <name>customrecord_my_custom_record</name>
    <label>My Custom Record</label>
    <translations>
        <translation locale="fr_CA">
            <label>Mon Enregistrement Personnalisé</label>
        </translation>
        <translation locale="es_ES">
            <label>Mi Registro Personalizado</label>
        </translation>
    </translations>
    <fields>
        <field>
            <fieldid>custrecord_my_field</fieldid>
            <label>My Field</label>
            <translations>
                <translation locale="fr_CA">
                    <label>Mon Champ</label>
                </translation>
                <translation locale="es_ES">
                    <label>Mi Campo</label>
                </translation>
            </translations>
            <type>text</type>
        </field>
        <!-- Additional fields and translations as necessary -->
    </fields>
    <!-- Further custom record configuration -->
</customrecordtype>
In this XML snippet,
<translations>
tags are used to define localized versions of the
<label>
tags for both the custom record type and its fields. The locale attribute specifies the locale for which the translation is provided. Note, while this example uses a structure that seems logical for defining translations within the custom record type definition, actual support for such a structure depends on the capabilities and limitations of the current version of SDF. If this approach is not supported, you may need to rely on scripts or other methods to handle translations dynamically.