Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
At the end of some .inc files generated by Features (let's consider FEATURENAME.features.field.inc), we notice that the developer took care to include some calls to the t() function so that the corresponding strings can be parsed by potx:
// Translatables
// Included for use with string extractors like potx.
t('Body');
t('Enter a comma-separated list of words to describe your content');
t('Image');
t('Tags');
t('Upload an image to go with this article');
Thanks to this, it is indeed easy to create .po files containing the relevant translations. Unfortunately, I cannot figure a way to force Drupal to actually use these translations... What am I missing?
Comments
Comment #1
mpotter CreditAttribution: mpotter commentedUsing the normal Drupal translation pages in your site configuration.
Comment #2
Paul B CreditAttribution: Paul B commentedAFAIK, field labels and descriptions are not translated unless the i18n module is installed.
I don't use the 18n module so I write field descriptions in Dutch. If my fields are exported to a feature
I end up with Dutch texts in my translation interface which is messy.
Maybe the Features module could try to detect if translatables are actually translatable?
Comment #3
hefox CreditAttribution: hefox commentedThe translatable are there so to generate .po files and such, it's standard exportable stuff, I don't think features has any plans to change this at any stage.